pub enum NodeKind {
Show 69 variants
Root,
EnumDeclaration,
TypeAlias,
EnumDefinition,
EnumCases,
EnumCase,
EnumConstructor,
TypeInstConcatenation,
Declaration,
FunctionDeclaration,
PredicateDeclaration,
AnnotationCapture,
TestDeclaration,
AnnotationDeclaration,
ParameterList,
Parameter,
TypeInstVariable,
ScalarType,
TupleType,
RecordType,
RecordField,
TupleLiteral,
RecordLiteral,
RecordLiteralField,
FieldAccessExpression,
DomainType,
SetType,
SetCardinality,
ArrayType,
ArrayIndexBinding,
ListType,
Assignment,
Constraint,
Include,
Output,
Solve,
SolveMinimize,
SolveMaximize,
Expression,
InterpolatedString,
UnaryExpression,
BinaryExpression,
ParenthesizedExpression,
CallExpression,
GeneratorCallExpression,
ConditionalExpression,
ConditionalBranch,
ElseBranch,
LetExpression,
LetBlock,
SetComprehension,
ArrayComprehension,
IndexedArrayComprehension,
GeneratorList,
Generator,
WhereFilter,
SetLiteral,
ArrayLiteral,
IndexedArrayEntry,
IndexTuple,
MatrixLiteral,
MatrixColumnIndices,
MatrixRow,
ArrayAccessExpression,
NamedArgument,
AnnotatedExpression,
Annotation,
RangeExpression,
Error,
}Variants§
Root
EnumDeclaration
Direct name token, annotations, and an optional EnumDefinition child.
TypeAlias
Direct name token, annotations, and the target type child.
EnumDefinition
Ordered case lists and constructors, separated by written ++ tokens.
EnumCases
Braces containing EnumCase children in written order.
EnumCase
The direct identifier token declares an enum member.
EnumConstructor
A direct declaration name (or anonymous _) and a parenthesized expression.
TypeInstConcatenation
Left type and right base type, separated by a written ++ token.
Declaration
The first child node is the type; later nodes are annotations/initializer.
FunctionDeclaration
Return type child, direct name token, and optional parameter list,
annotations and body expression. Deprecated omitted-keyword declarations
contain no function token.
PredicateDeclaration
Direct name token, optional parameter list, annotation capture, annotations and body.
AnnotationCapture
Written ann, colon and direct binding name; captures contextual annotations
in a predicate signature, separate from its formal ParameterList.
TestDeclaration
Direct name token, optional parameter list, annotations and body.
AnnotationDeclaration
Direct name token, optional parameter list and body; no annotations.
ParameterList
Parentheses and ordered Parameter children; omitted lists have no node.
Parameter
The type child, optional direct name token, ordered Annotation children, and optional default expression child. Unnamed parameters contain only a type; annotations after a default belong to that expression.
TypeInstVariable
Generic variable spelling, with any/var/par/opt qualifiers retained.
ScalarType
TupleType
Ordered type children within written tuple parentheses.
RecordType
Ordered RecordField children within written record parentheses.
RecordField
Type child and direct declaration name token with its precise range.
TupleLiteral
Parentheses and ordered value children; the first comma is required.
RecordLiteral
Ordered RecordLiteralField children; the first comma is required.
RecordLiteralField
Direct field name token and value child; names label values, not declarations.
FieldAccessExpression
Subject child followed by a dot and direct reference name or integer token.
DomainType
Contains one domain expression, with any qualifiers retained as tokens.
SetType
Contains an optional cardinality followed by the element type.
Qualifiers and set of remain tokens.
SetCardinality
Parentheses containing the written cardinality expression.
ArrayType
Child nodes are index types or bindings followed by the element type.
ArrayIndexBinding
Direct tokens retain the binding name and in; the child is its index type.
ListType
Contains the element type.
Assignment
Constraint
A keyword/optional label and expression, or a keyword-free identifier equality.
Include
Contains the written string literal path; no include resolution is performed.
Output
Optional direct Annotation child followed by the output expression.
Solve
A satisfy item, with direct Annotation children and no objective.
SolveMinimize
Direct Annotation children followed by the minimization objective expression.
SolveMaximize
Direct Annotation children followed by the maximization objective expression.
Expression
A literal or identifier atom, including anonymous and absent values.
InterpolatedString
Exact string chunks alternate with embedded expression child nodes.
UnaryExpression
BinaryExpression
ParenthesizedExpression
CallExpression
A callable invocation or anonymous _(expression) enum constructor.
GeneratorCallExpression
Written call name/header tokens, an ordered generator list, then a parenthesized body expression.
ConditionalExpression
Ordered if/elseif branches, an optional else branch, and the endif token.
ConditionalBranch
The keyword, condition expression, then token, and body expression.
ElseBranch
The else token and its body expression.
LetExpression
The let token, local block, in token, and greedy body expression.
LetBlock
Ordered Declaration/Constraint children with written separators. Local declarations expose names and their ranges as direct token leaves, just like top-level declarations; the first child node is their type.
SetComprehension
Child nodes are the head expression and ordered generator list.
ArrayComprehension
IndexedArrayComprehension
Child nodes are an indexed entry (key/value) and ordered generator list.
GeneratorList
Child nodes are generators in written order; commas remain token leaves.
Generator
Direct tokens retain binding names and in or =. Child nodes are the
source/value expression followed by an optional attached WhereFilter.
WhereFilter
The written where token followed by its expression child.
SetLiteral
Child nodes are the entries; empty literals have no child nodes.
ArrayLiteral
Child nodes are bare expressions or indexed entries, in written order.
IndexedArrayEntry
Child nodes are the written key and value, separated by a colon token.
IndexTuple
Parenthesized key components; only supported in indexed-entry keys.
MatrixLiteral
Contains an optional column header and rows, with written pipe delimiters.
MatrixColumnIndices
Child nodes are column indices, each followed by a colon token.
MatrixRow
Child nodes are cells, preceded by an index child when a colon is present. Empty written rows have a zero-width range at their pipe delimiter.
ArrayAccessExpression
Child nodes are the subject followed by one or more index expressions.
NamedArgument
AnnotatedExpression
Annotation
An annotation marker and its atom; distinct from the annotated subject.
RangeExpression
Children contain the written bounds and marker; either bound may be omitted.