Skip to main content

Module ast

Module ast 

Source

Structs§

Ast
BindingDefault
A destructuring default, lowered to saved === undefined ? default : saved.
CatchClause
catch (e) and bindingless catch are catch-all clauses. A bindingless clause uses an inaccessible compiler identifier. When present, the typechecker verifies ty is an Error class.
ClassModifiers
Modifiers on a class field or method. readonly/visibility_span carry spans so later phases can anchor diagnostics (e.g. assignment to a readonly field).
EnumMember
ExportedDecl
A top-level declaration marked export (Form 1: export function …, export const …, etc.). The declaration itself stays a plain node in top_level; this side record only tracks which ones are export-marked, so the inference passes need no export awareness.
Expr
ExprId
Ident
ImportSpecifier
IndexSignatureAnnotation
A string index signature; the parameter name is documentation only.
ObjectLiteralField
ObjectPatternField
source is the field name on the RHS; local is the binding name. Equal for shorthand { a }, differ for { a: x }.
ParamDecl
Source-syntax parameter. Fully-resolved form is crate::Param.
PatternOrigin
Metadata for a synthesized IndexAccess from pattern lowering — lets the typechecker emit destructure-specific errors.
Stmt
StmtId
SwitchCase
values has multiple entries when consecutive case labels share a body.
SwitchDefault
Separate from SwitchCase so duplicate-default detection has nowhere to slip.
TypeAnnotation
TypeAnnotationField
Reused for object-type fields and function-type parameters. rest is always false in object position; readonly is only meaningful for object-type fields (always false for function/tuple parameters).
TypePredicateAnnotation
Surface form of <param> is <T>. Only valid at a function return-type position.

Enums§

AccessorKind
ArrayLiteralElement
ArrowBody
BinOp
Binding
Destructuring binding pattern. Plain Ident bindings stay as Let/Const stmts; only {…} / […] forms appear here.
BindingKind
ChainPart
ClassMember
EnumInitializer
Enum member initializer. Restricted to numeric and string literals (numeric may be negated).
ExprKind
ImportKind
InterfaceMember
ObjectLiteralMember
PostfixOp
Postfix only — prefix ++x/--x is not supported.
StmtKind
TypeAnnotationKind
UnOp
Visibility
Member visibility. No protected — it is rejected at parse time.