1 stable release
| 1.2.3 |
|
|---|---|
| 1.2.2 |
|
| 1.0.8 |
|
| 1.0.7 | Dec 14, 2020 |
#19 in #leo
29 downloads per month
Used in 2 crates
195KB
3K
SLoC
The pest abstract syntax tree (ast) for a Leo program.
This module contains the Grammar type, a wrapper around the File type in this module.
The Grammar type is the datatype generated by the pest parser using grammar from leo.pest.
The Grammar type is intended to be parsed into a [Ast]. It should not be parsed by
any other pass of the compiler.
leo-grammar
Command-line instructions
To generate an AST of the Leo program and save it as a JSON file , run:
leo_grammar {PATH/TO/INPUT_FILENAME}.leo {PATH/TO/OUTPUT_DIRECTORY (optional)}
If no output directory is provided, then the program will store the JSON file in the local working directory.
Dependencies
~8–11MB
~130K SLoC