Skip to content

Add an ast script #123

@StoneyJackson

Description

@StoneyJackson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions