Open wanderer opened 8 years ago
We can definitely learn from Shift AST Format. it is great format of JS. But in my opinion AST nodes should directly represent some elements of language, and any valid AST can be used to produce valid program in that language. Shift AST (or any other JS AST) have some things missing in WebAssembly, some things extra, and some things you can indirectly MAP. So, I don't think so.
and some things you can indirectly MAP
yeah that is my instinct to. But it seems like there is a lot of shared semantics
it would be intersting to define a mapping to shift or esperma from wasm ast. Is there a canonical why to do something like that? The obvious usecase here is transpiling wasm to JS.
could we possible use the shift AST format?
How would types be represented (i64, i32..)?
How would extending Shift to add rules for wast work?
cc @michaelficarra