Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract syntax tree for µcad files

Structs§

ArgumentDefinition
A definition of a single of a workbench definition or function definition
ArgumentList
A list of arguments to a function call
ArgumentsDefinition
A definition of the arguments of a workbench definition or function definition
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
Assignment
An assigment statement
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
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
ModuleDefinition
A definition of a module
NamedArgument
An argument with a specified name
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
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
Operator
An operator for binary operators
Statement
A µcad statements
StringPart
A part of a FormatString
Type
The possible types
UnaryOperator
An operator for unary operators
UseStatementPart
The parts a UseName consists of, separated by ::
Visibility
An optional visibility modifier that can be art of assigment and module, function and workbench definitions
WorkbenchKind
The possible type of workbenches