Expand description
This module contains all the rowan types.
All GreenNodes and consequently RedNodes as well as AST Nodes contain a single SyntaxKind variant for each GreenNode.
You can use the macro (T![])crate::T to quickly construct a SyntaxKind and for example compare it to a different one. For example
use ludtwig_parser::syntax::untyped::SyntaxKind;
use ludtwig_parser::T;
assert_eq!(T!["%}"], SyntaxKind::TK_PERCENT_CURLY);
An overview of the syntax tree concept can be found at the crate level documentation.
Structs§
- Green
Node - Internal node in the immutable tree. It has other nodes and tokens as children.
- Green
Node Builder - A builder for a green tree.
- Syntax
Text - Text
Range - A range in text, represented as a pair of
TextSize
. - Text
Size - A measure of text length. Also, equivalently, an index into text.
Enums§
- Direction
- Syntax
Kind - Template
Language - Walk
Event WalkEvent
describes tree walking process.
Traits§
- Language
- Syntax
Node Ext - TextLen
- Primitives with a textual length that can be passed to
TextSize::of
.