Presently we deal with things like auto init assigns and for/loop sugar in the compiler directly.
Consider if we should instead run a desugaring step/converter ahead of the compiler. The intent being that the compiler itself has to do less work and know less. It would only know about the desugared version of the language.
This might also open up options for things that presently use an opcode and special vm behaviour out and desugar them to more common.
Note: potentially this could take over the string interp logic as a starting point.
Presently we deal with things like auto init assigns and for/loop sugar in the compiler directly.
Consider if we should instead run a desugaring step/converter ahead of the compiler. The intent being that the compiler itself has to do less work and know less. It would only know about the desugared version of the language.
This might also open up options for things that presently use an opcode and special vm behaviour out and desugar them to more common.
Note: potentially this could take over the string interp logic as a starting point.