This PR cleans up ast/desugar.rs, now that we've moved both the parser and the symbol generation out of the Desguar struct.
More specifically, this PR:
Deletes the Desugar struct. (We also discussed doing something like struct Desugar(&mut SymbolGen), but I don't want to do this unless we have at least two things inside the struct.)
Deletes the desugar::get_fresh function, as I think that we should instead give name hints to SymbolGen that indicate where the variable was generated from.
Deletes desugar_commands, as without the Desugar struct this is exactly the same as desugar_program (which I've moved to the top of the file as the entry point).
This PR cleans up
ast/desugar.rs
, now that we've moved both the parser and the symbol generation out of theDesguar
struct. More specifically, this PR:Desugar
struct. (We also discussed doing something likestruct Desugar(&mut SymbolGen)
, but I don't want to do this unless we have at least two things inside the struct.)desugar::get_fresh
function, as I think that we should instead give name hints toSymbolGen
that indicate where the variable was generated from.desugar_commands
, as without theDesugar
struct this is exactly the same asdesugar_program
(which I've moved to the top of the file as the entry point).