Crate leo_parser

Source
Expand description

The Leo parser.

This crate now makes use of leo-parser-lossless, and translates its output to the Leo AST. The functions such as to_expression and to_statement in the conversions module directly convert SyntaxNodes from the lossless tree into AST nodes. The publicly exposed functions such as parse_expression and parse_statement can be called without reference to the lossless parser to complete the entire parsing task.

Modulesยง

conversions ๐Ÿ”’

Functionsยง

compute_module_key ๐Ÿ”’
Computes a module key from a FileName, optionally relative to a root directory.
parse
parse_ast
Creates a new AST from a given file path and source code text.
parse_expression
parse_module
parse_statement
symbol_is_keyword ๐Ÿ”’