Structs§
- Ast
- Binding
Default - A destructuring default, lowered to
saved === undefined ? default : saved. - Catch
Clause catch (e)and bindinglesscatchare catch-all clauses. A bindingless clause uses an inaccessible compiler identifier. When present, the typechecker verifiestyis an Error class.- Class
Modifiers - Modifiers on a class field or method.
readonly/visibility_spancarry spans so later phases can anchor diagnostics (e.g. assignment to areadonlyfield). - Enum
Member - Exported
Decl - A top-level declaration marked
export(Form 1:export function …,export const …, etc.). The declaration itself stays a plain node intop_level; this side record only tracks which ones are export-marked, so the inference passes need noexportawareness. - Expr
- ExprId
- Ident
- Import
Specifier - Index
Signature Annotation - A string index signature; the parameter name is documentation only.
- Object
Literal Field - Object
Pattern Field sourceis the field name on the RHS;localis the binding name. Equal for shorthand{ a }, differ for{ a: x }.- Param
Decl - Source-syntax parameter. Fully-resolved form is
crate::Param. - Pattern
Origin - Metadata for a synthesized
IndexAccessfrom pattern lowering — lets the typechecker emit destructure-specific errors. - Stmt
- StmtId
- Switch
Case valueshas multiple entries when consecutivecaselabels share a body.- Switch
Default - Separate from
SwitchCaseso duplicate-default detection has nowhere to slip. - Type
Annotation - Type
Annotation Field - Reused for object-type fields and function-type parameters.
restis alwaysfalsein object position;readonlyis only meaningful for object-type fields (alwaysfalsefor function/tuple parameters). - Type
Predicate Annotation - Surface form of
<param> is <T>. Only valid at a function return-type position.
Enums§
- Accessor
Kind - Array
Literal Element - Arrow
Body - BinOp
- Binding
- Destructuring binding pattern. Plain
Identbindings stay asLet/Conststmts; only{…}/[…]forms appear here. - Binding
Kind - Chain
Part - Class
Member - Enum
Initializer - Enum member initializer. Restricted to numeric and string literals (numeric may be negated).
- Expr
Kind - Import
Kind - Interface
Member - Object
Literal Member - Postfix
Op - Postfix only — prefix
++x/--xis not supported. - Stmt
Kind - Type
Annotation Kind - UnOp
- Visibility
- Member visibility. No
protected— it is rejected at parse time.