JazzleWare / jazzle

An Innovative, Fast Transpiler for ECMAScript 2015 and later
Other
65 stars 2 forks source link

fun decls have get transformed first #5

Open icefapper opened 7 years ago

icefapper commented 7 years ago

currently they are transformed in source order, which necessitates using scope activation/deactivation jugglery -- not a big deal, but it is unnecessary complexity anyway; if funs are saved in a scope slot before transformation begins (that is, saving must occur while parsing), the transformer can simply start off by transforming declarations saved in the fns slot of every scope the transformer enters; in other words, anything hoisted in a scope should get transformed first; in other words, again, source elements should get transformed based on their semantic position rather than their source location; this will also make things easier when the notion of "active-after" indices are brought into use, helping shake/shave any modifications happening after the side-effect has been executed.