Closed GerHobbelt closed 7 years ago
Since 0.6.0-191: lexer has started to use recast/prettier, though still no lexer-level (action) code analyzer in place. jison itself (parser generator) still uses regexes for code analysis and code stripping/injecting, but that is to change in the later builds/releases as recast et al get introduced there.
I'll be testing these libraries (and optimize-js + magic-string) further, for I haven't found a clear winner yet. AST traversal and code flow analysis are obviously the way forward to produce leaner (and thus faster) code, but the dev cost is pretty high compared to the current regex-based analysis/strip/inject approach: I find the current method dev-cost heavy, but so is the AST-based alternative.
Closing this one. It was just one direction I was looking; the recast/...whatever... work is being done (slowly) and this is now just a hint.
For inspiration: