1 stable release
1.2.3 |
|
---|---|
1.2.2 |
|
1.0.8 |
|
1.0.7 | Dec 14, 2020 |
#12 in #leo
29 downloads per month
Used in 2 crates
195KB
3K
SLoC
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.
lib.rs
:
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.
Dependencies
~3–4.5MB
~87K SLoC