Module ludtwig_parser::syntax::untyped
source · Structs
GreenNodeis an immutable tree, which is cheap to change, but doesn’t contain offsets and parent pointers. Internal node in the immutable tree. It has other nodes and tokens as children.- You can construct
GreenNodesby hand, but a builder is helpful for top-down parsers: it maintains a stack of currently in-progress nodes A builder for a green tree. - A range in text, represented as a pair of
TextSize. - A measure of text length. Also, equivalently, an index into text.
Enums
- Second, implementing the
Languagetrait teaches rowan to convert between these twoSyntaxKindtypes, allowing for a nicerSyntaxNodeAPI where “kinds” are values from ourenum SyntaxKind, instead of plain u16 values. WalkEventdescribes tree walking process.
Traits
- Primitives with a textual length that can be passed to
TextSize::of.
Functions
Type Definitions
- To work with the parse results we need a view into the green tree - the Syntax tree. It is also immutable, like a
GreenNode, but it contains parent pointers, offsets, and has identity semantics.