Re:Bublé: a fast, batteries-included ES2015 transpiler
by aspiringuser on Monday May 16, 2016 @10:03AM
(#11706290)
Surely the AST is still produced? Acorn is the parser I assume?
[ Parent
| on HN ]
Re:Bublé: a fast, batteries-included ES2015 transpiler
by rich_harris on Monday May 16, 2016 @11:35AM
(#11706953)
Correct – Acorn is a truly wonderful library
Re:Bublé: a fast, batteries-included ES2015 transpiler
by Touche on Monday May 16, 2016 @11:55AM
(#11707132)
Hey Rich, I wish some time you would write more about magic-string and what makes it special. You say "no costly code generation step", but what makes codegen costly compared to what you're doing in magic-string?
Re:Bublé: a fast, batteries-included ES2015 transpiler
by rich_harris on Monday May 16, 2016 @01:36PM
(#11707974)
I plan to write about this in the near future (in fact I'm writing slides for a talk on it this week) – essentially, codegen is more costly because a) you have to generate the entire program, rather than just modifying the nodes that have changed, b) your code generator needs to know about every single node type, and c) you have to keep track of state (e.g indentation levels).