Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract syntax tree for µcad files

Structs§

ArgumentList
A list of arguments to a function call
ArrayItem
An item that can be part of an array expression
ArrayListExpression
An array specified as a list of items
ArrayRangeExpression
An array range, containing all values from the start value (inclusive) till then end value (exclusive)
ArrayType
An array type
Attribute
An attribute that can be attached to a statement
BinaryOperation
A binary operation
BoolLiteral
A boolean literal, either true or false
Call
A function call
Comment
A single- or multi-line comment
ConstAssignment
A const assignment: const A = 42 / pub A = 32
ElementAccess
An expression that access an element from another expression.
ExpressionStatement
A statement containing of a bare expression
FloatLiteral
An float literal without type
FormatString
A string containing a format expression
FunctionDefinition
A definition of a function
Identifier
A µcad identifier
If
An if expression, can be used as either a statement or expression
InitDefinition
An init definition for a workbench
IntegerLiteral
An integer literal without type
ItemExtras
Non-syntactic extras that can be attached to many ast nodes
Literal
A literal value
LiteralError
An error that can be encountered while parsing literal tokens
LocalAssignment
A local assignment statement: a = 42;
ModuleDefinition
A definition of a module
NamedArgument
An argument with a specified name
Operator
An operator for binary operators, together with a span
Parameter
A parameter for a workbench definition or function definition
ParameterList
A parameter list of a workbench definition or function definition
PropertyAssignment
A property assignment: prop A = 42
QualifiedName
A qualified name, containing one or more Literals seperated by ::
QuantityLiteral
Return
A return statement
SingleType
A type for a single numeric value
SourceFile
A µcad source file
StatementList
A list of statements, with an optional “tail” expression
StringCharacter
A single character that is part of a FormatString
StringExpression
A format expression that is part of a FormatString
StringFormatSpecification
The format specification for a StringExpression, specifying the with and precision for number formatting
StringLiteral
A string literal, without format expressions
TupleExpression
A tuple expression, a fixed size set of items that don’t need to be the same type
TupleItem
An item that is part of a tuple expression
TupleType
A tuple type
UnaryOperation
A unary operation
UnaryOperator
An operator for unary operators, together with a span
UnnamedArgument
An argument without specified name
UseName
The name of the item being imported
UseStatement
A use statement that imports an item from an external library
WorkbenchDefinition
A definition of a workbench

Enums§

Argument
A function argument that is part of an ArgumentList
AssignmentQualifier
An optional qualifier that can be part of an [Assignment]
AttributeCommand
The contents an an Attribute
Element
The possible element access types
Expression
Any expression.
ItemExtra
LiteralErrorKind
LiteralKind
The various types of literal values a Literal can contain
OperatorType
The type of the operator for binary operations
Statement
A µcad statements
StringPart
A part of a FormatString
Type
The possible types
UnaryOperatorType
The type of the operator for unary operations
UseStatementPart
The parts a UseName consists of, separated by ::
Visibility
An optional visibility modifier that can be art of assignment and module, function and workbench definitions
WorkbenchKind
The possible type of workbenches