Skip to main content

Module ast

Module ast 

Source
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): @name or @name(args) — metadata only (D4)
Decl
a declaration, with whether it is exported and its source range
ForClause
a comprehension clause
ImportItem
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
MatchArm
an arm of a match
Param
a parameter of a function, a type, or a diagnostic

Enums§

DeclBody
a declaration (§5, §8)
Expr
an expression (§4)
MemberAst
a member of a record type (§5)
TPart
a part of a template: text, or an interpolated expression
Tail
an else tail: 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 $referrers anywhere? (deferred slots)
set_expr_loc
Record an expression’s source range.