Crate mun_syntax

source ·
Expand description

Syntax Tree Library used throughout Mun.

This crate is heavily inspired by Rust Analyzers ra_syntax and ra_parser crates.

Properties: - easy and fast incremental re-parsing - graceful handling of errors - full-fidelity representation (any text can be precisely represented as a syntax tree)

Re-exports

pub use crate::ast::AstNode;
pub use crate::ast::AstToken;

Modules

Macros

Matches a SyntaxNode against an ast type.

Structs

Like SyntaxNodePtr, but remembers the type of node
Parse is the result of the parsing: a syntax tree and a collection of errors.
A SmolStr is a string type that has the following properties:
SourceFile represents a parse tree for a single Mun file.
A pointer to a syntax node inside a file. It can be used to remember a specific node across reparses of the same file.
A range in text, represented as a pair of TextSize.
A measure of text length. Also, equivalently, an index into text.
A token of Mun source

Enums

The kind of syntax node, e.g. IDENT, USE_KW, or STRUCT_DEF.
WalkEvent describes tree walking process.

Functions

Break a string up into its component tokens

Type Definitions