[−][src]Module haru::ast
Provides parser and abstract syntax tree structures.
The parser exports the function ast::grammar::start
used to generate a vector of abstract syntax trees
representing statements. The AST can then be used to
emit raw bytecode to a Compiler
.
use haru::ast::{ast, grammar}; let prog = grammar::start("print('Hello World')").unwrap();
Modules
ast | Provides abstract syntax trees for language blocks. |
grammar | Parser implementation |
Functions
pos_to_line | Converts a index in string to a tuple of (line, col) position information. |