You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, can we use the compiler to detect State and lazy state references and top level operations
This requires a big compiler change
instead of detecting and transforming structures, we split the compiler into two phases
Phase 1 traverses the AST, detects key structures (operation, lazy state reference) and annotates the AST
Phase 2 finds the annotated nodes and transforms them, just as it does today.
If we have this compiler architecture, then VSC only needs to run phase 1, not phase 2, and we can re-use the logic.
Can we swap out VSC's in built compiler and use our own? Rather than parsing twice? The dream implementation is that we would control the first ast compilation that VSC does, annotate extra stuff, and then pass the esprima API syntax tree down to VSC.
Alternatively, we extract the esprima tree from VSC and pass that into the compiler (rather than compiling ourselves with acorn).
Either of these solutions prevents a duplication of work. But it's not essential!
The text was updated successfully, but these errors were encountered:
For example, can we use the compiler to detect State and lazy state references and top level operations
This requires a big compiler change
If we have this compiler architecture, then VSC only needs to run phase 1, not phase 2, and we can re-use the logic.
Can we swap out VSC's in built compiler and use our own? Rather than parsing twice? The dream implementation is that we would control the first ast compilation that VSC does, annotate extra stuff, and then pass the esprima API syntax tree down to VSC.
Alternatively, we extract the esprima tree from VSC and pass that into the compiler (rather than compiling ourselves with acorn).
Either of these solutions prevents a duplication of work. But it's not essential!
The text was updated successfully, but these errors were encountered: