Expand description
Abstract syntax tree for µcad files
Structs§
- Argument
List - A list of arguments to a function call
- Array
Item - An item that can be part of an array expression
- Array
List Expression - An array specified as a list of items
- Array
Range Expression - An array range, containing all values from the start value (inclusive) till then end value (exclusive)
- Array
Type - An array type
- Attribute
- An attribute that can be attached to a statement
- Binary
Operation - A binary operation
- Binary
Operator - An operator for binary operators, together with a span
- Body
- Bool
Literal - A boolean literal, either
trueorfalse - Call
- A function call
- Comment
- A single- or multi-line comment
- Const
Assignment - A const assignment:
const A = 42/pub A = 32 - DocBlock
- Lines of inner or outer doc block including prefix
//////!. - Element
- Element
Access - An expression that access an element from another expression.
- Expression
Statement - A statement containing of a bare expression
- File
Module - A definition of a module
- Float
Literal - An float literal without type
- Format
String - A string containing a format expression
- Function
Definition - A definition of a function
- Identifier
- A µcad identifier
- If
- An if expression, can be used as either a statement or expression
- Init
Definition - An init definition for a workbench
- Inline
Module - A definition of a module
- Inner
DocComment - An inner doc block
- Integer
Literal - An integer literal without type
- Item
Extras - Non-syntactic extras that can be attached to many ast nodes
- Leading
Extras - Extras that occur after a syntax element.
- Literal
- A literal value
- Literal
Error - An error that can be encountered while parsing literal tokens
- Local
Assignment - A local assignment:
a = 42 - Named
Argument - An argument with a specified name
- Parameter
- A parameter for a workbench definition or function definition
- Parameter
List - A parameter list of a workbench definition or function definition
- Program
- A µcad program
- Property
Assignment - A property assignment:
prop a = 42 - Qualified
Name - A qualified name, containing one or more [
Identifier]s separated by:: - Quantity
Literal - A float literal with type
- Return
- A return statement
- Single
Type - A type for a single numeric value
- Source
- A µcad source with a parse syntax tree with a line offset and the hashed original source code.
- Statement
List - A list of statements, with optional trailing whitespace kept and an optional “tail” expression
- String
Character - A single character that is part of a
FormatString - String
Expression - A format expression that is part of a
FormatString - String
Format Specification - The format specification for a
StringExpression, specifying the width and precision for number formatting - String
Literal - A string literal, without format expressions
- Trailing
Extras - Extras that occur before a syntax element.
- Tuple
Expression - A tuple expression, a fixed size set of items that don’t need to be the same type
- Tuple
Item - An item that is part of a tuple expression
- Tuple
Type - A tuple type
- Unary
Operation - A unary operation
- Unary
Operator - An operator for unary operators, together with a span
- Unit
- A µcad unit: mm, m³, %.
- Unnamed
Argument - 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
- Workbench
Definition - A definition of a workbench
Enums§
- Argument
- A function argument that is part of an
ArgumentList - Attribute
Command - The contents an an
Attribute - Binary
Operator Type - The type of the operator for binary operations
- Comment
Inner - Element
Inner - The possible element access types
- Expression
- Any expression.
- Item
Extra - Literal
Error Kind - Literal
Kind - The various types of literal values a
Literalcan contain - Statement
- A µcad statement.
- String
Part - A part of a
FormatString - Type
- The possible types
- Unary
Operator Type - The type of the operator for unary operations
- UseStatement
Part - The parts a
UseNameconsists of, separated by:: - Visibility
- An optional visibility modifier
- Workbench
Kind - The possible type of workbenches