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

Add an ast script #123

Open
StoneyJackson opened this issue Apr 22, 2024 · 0 comments
Open

Add an ast script #123

StoneyJackson opened this issue Apr 22, 2024 · 0 comments

Comments

@StoneyJackson
Copy link
Member

To generate an JSON AST of a program, instead of passing a boolean flag to parse

parse --json_ast < prog

Maybe we should have a separate script

ast < prog

Then parse only does one thing. And the functionality of producing an AST is performed by a different script/command. The implementation of "generating an AST" is already separate from that of "checking the syntax of a program". Currently parse is implemented by Parse.java, and parse --json_ast is implemented by ParseJsonAst.java.

The downside is that it adds another user-facing command.

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

1 participant