4 ms·
Surely the AST is still produced? Acorn is the parser I assume?
by aspiringuser 10y ago
Surely the AST is still produced? Acorn is the parser I assume?
- rich_harris 10y agoCorrect – Acorn is a truly wonderful library
- Touche 10y agoHey 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?
- rich_harris 10y agoI 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).