Expand description
Rowan-based lossless syntax tree and parser for Leo.
This crate provides a lossless parser using the rowan library, designed for
IDE-grade error recovery. It will eventually replace the LALRPOP-based
parser in leo-parser-lossless.
Structs§
- LexError
- An error encountered during lexing.
- Parse
- The result of a parse operation.
- Parse
Error - An error encountered during parsing.
- Parser
- The parser state.
- Token
- A token produced by the lexer.
Enums§
- LeoLanguage
- The Leo language type for rowan.
- Syntax
Kind - All syntax kinds for Leo tokens and nodes.
Functions§
- lex
- Lex the given source text into a sequence of tokens.
- parse_
expression - Parse an expression from source code.
- parse_
expression_ entry - Parse a single expression.
- parse_
file - Parse a complete Leo source file.
- parse_
main - Parse a main program file from source code.
- parse_
module - Parse a module from source code.
- parse_
module_ entry - Parse module contents (const, struct, inline declarations only).
- parse_
statement - Parse a statement from source code.
- parse_
statement_ entry - Parse a single statement.
- syntax_
kind_ from_ raw - Convert a raw rowan SyntaxKind to our SyntaxKind.
Type Aliases§
- Syntax
Element - Either a syntax node or token.
- Syntax
Node - A syntax node in the Leo syntax tree.
- Syntax
Token - A syntax token in the Leo syntax tree.