Desugaring is a process within the “Walk” phase of the compiler’s middle end where high-level language constructs (syntactic sugar) are converted into more primitive ones.
For example:
- Range clauses in for loops can be rewritten with an explicit loop variable.
- An unless statement can be implemented as a negated
ifstatement.
