jscert / jsexplain

Apache License 2.0
26 stars 4 forks source link

Generator Should Use an Intermediate AST For Code Generation #18

Open IgnoredAmbience opened 6 years ago

IgnoredAmbience commented 6 years ago

Currently we do code generation from Typedtree (OCaml) -> JS source text (x3 variations). It would be easier to do Typedtree -> JS AST (possibly tagged with metadata) -> JS source text (x3 variations). This would improve the structure of the generation functions.

IgnoredAmbience commented 6 years ago

Alan's suggestion: not necessarily the JS AST, but a clean AST where we get rid of the OCaml idiosyncrasies of Typedtree and also include our features such as monadic let bindings as a native feature (instead of through extension points)