Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

Conversation

@vvp
Copy link
Contributor

@vvp vvp commented Nov 5, 2019

Current iteration of js2amb works as a proof-of-concept, but the way it's designed will make the path forward hard if not impossible. This PR restructures the whole compiler, and introduces intermediate data structures for different compilation steps when parsing JS to Ambients.

Before this, parsing JS with Esprima and turning that directly to algebra-strings quickly ends up in if/else-heavy code, that doesn't cover all the possible combinations of JS expressions to corresponding Ambients primitives (basically, it's not compositional). This PR changes this by introducing few more AST-types to orchestrate the compilation steps better and enable compiler to do type checking and optimizations without hardcoding.

This is still work-in-progress, but wanted to let you know what does it look like and where is this going 🙂

V-V added 30 commits October 28, 2019 10:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant