Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow valid javascript AST's #33

Open
mvcisback opened this issue Jul 3, 2014 · 1 comment
Open

Only allow valid javascript AST's #33

mvcisback opened this issue Jul 3, 2014 · 1 comment

Comments

@mvcisback
Copy link

skimming through the code, it seems that all non-leaf nodes can allow any node as a child. This allows AST's to potentially represent invalid programs. It would be nice to be able to explicitly require the program to be correct by being representable by the tree.

@erikd
Copy link
Owner

erikd commented Mar 18, 2016

Yes, it would be nice if the AST was "correct-by-construction". The code in the existing master branch allows the construction of all sorts of totally invalid ASTs.

There is however a new-ast branch which is a vast improvement over the code in master, but does not completely solve the problem. I'm hoping to release version 0.6.0.0 which uses this new AST today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants