Expand description
AST of the runtime — the shape the tree-sitter CST lowers into (parse.rs), mirroring the reference implementation’s ast.ts.
Structs§
- Annotation
- an annotation (§5.10):
@nameor@name(args)— metadata only (D4) - Decl
- a declaration, with whether it is exported and its source range
- ForClause
- a comprehension clause
- Import
Item - an imported name, possibly renamed
- Loc
- a source range: zero-based rows and columns (UTF-16 units, as the reference reads them from web-tree-sitter), end exclusive
- Match
Arm - an arm of a
match - Param
- a parameter of a function, a type, or a diagnostic
Enums§
- Decl
Body - a declaration (§5, §8)
- Expr
- an expression (§4)
- Member
Ast - a member of a record type (§5)
- TPart
- a part of a template: text, or an interpolated expression
- Tail
- an
elsetail: an inline message with a severity, or a diagnostic reference - TypeAst
- a type expression (§3; chapter 11)
Functions§
- expr_
loc - An expression’s source range, when recorded.
- expr_
name - A short name for an expression, for messages.
- mentions_
referrers - does an expression mention
$referrersanywhere? (deferred slots) - set_
expr_ loc - Record an expression’s source range.