To generate an JSON AST of a program, instead of passing a boolean flag to parse
Maybe we should have a separate script
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.
To generate an JSON AST of a program, instead of passing a boolean flag to parse
Maybe we should have a separate script
Then
parseonly 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". Currentlyparseis implemented byParse.java, andparse --json_astis implemented byParseJsonAst.java.The downside is that it adds another user-facing command.