Open eevee opened 11 years ago
I have a branch that takes a crack at this. Virtually everything is broken at the moment, but it's looking promising, and I'm hoping there'll be a decent speedup from not having to constantly reparse mixins and functions. (Watch mode would be able to skip reparsing entire files!)
Much like the splitting of parsing vs. execution of expressions.
I think this is a necessary step for fixing several scoping problems; at the moment, an entire block is executed before any blocks nested within it, which is obviously wrong in cases like the following:
Ruby correctly outputs
green
. pyScss outputsred
, because all the outer statements execute before anything inh2
.It's possible to fix this by fixing the rule execution order, with some code juggling. But that requires either heavy recursion or delaying examining some blocks, which is effectively this ticket anyway.
Separate steps make life easier in a couple other ways:
@import
ed files, mixins,%
rules, and@for
bodies can be parsed once and executed multiple times@while
actually work (#121)