Module ast

Source
Expand description

AST representation

§AST

Abstract Syntax Tree representation contains tree node that represent full cycle and aspects of the programming language, and represent Turing-complete state machine.

Structs§

Binding
Binding binding element of AST. Basic entity for values re-declaration, to bind new values for already declared values.
CodeLocation
CodeLocation code location of source for AST elements. Contains: line nad position.
Constant
Constant constant declaration element of AST. Basic constant entity contains:
ConstantExpression
ConstantExpression constant expression element of AST. Used to declare constants. The constant expression value based on other constant or primitive values. Constant Expression can contain optional expression operation with other constant expression. So it can be represented as Constant expression tree as operations with other constant expressions.
ConstantName
ConstantName constant name for Constant elements of AST
Expression
Expression element of AST is basic entity that represent expression, and optionally expression with optional operations with other expression. So it can be expression tree with expression operations.
ExpressionCondition
ExpressionCondition expression condition element of AST. Used in ExpressionLogicCondition for IfCondition declaration. It contains condition between twe expressions.
ExpressionLogicCondition
Logic expression condition
ExpressionStructValue
ExpressionStructValue expression struct value element of AST. Used for expression value declaration. The basic entity is:
FunctionCall
FunctionCall function call element of AST. Basic entity for function call representation.
FunctionName
FunctionName function name for Function elements of AST.
FunctionParameter
FunctionParameter function parameter element of AST. Used for FunctionStatement declaration.
FunctionStatement
FunctionStatement it’s one of the most basic element of AST. Basic entity of program logic. It contains function declaration and function body.
Ident
Basic Ident entity for elements of AST
IfStatement
IfStatement if statement AST element. Contains full representation of if statement with entities:
ImportName
Import name element of AST
LetBinding
LetBinding let binding element of AST. Basic entity for values declarations.
ParameterName
ParameterName parameter name element of AST, used for Function parameters declaration.
StructType
StructType struct type basic element used for StructTypes. It contains basic elements:
StructTypes
StructTypes struct type element of AST. Basic entity to declare struct complex types and its attributes.
ValueName
ValueName value name element of AST. It’s basic entity for:

Enums§

BodyStatement
BodyStatement one of the basic AST elements. It’s part of Function body.
Condition
Condition condition declarations. Used for ExpressionCondition. Contains basic condition entities: <. >, ==, <=, >=, !=
ConstantValue
ConstantValue constant value element of AST. Used for ConstantExpression. Constant value basic entities:
ExpressionOperations
ExpressionOperations expression operation element of AST. Used for expression operations:
ExpressionValue
ExpressionValue expression value element of AST. Basic entity for Expression elements of AST. Expression value contains entities:
IfBodyStatement
IfBodyStatement statement of if-body elements tree of AST. Used as body statement of If-control flow.
IfBodyStatements
IfBodyStatements set of elements in the AST, that represents control flow: if, loop
IfCondition
IfCondition if-condition control flow element of AST. One of the basic control flow. Basic entities:
IfLoopBodyStatement
IfLoopBodyStatement statement of loop-if-body elements tree of AST. Used as body statement of If-control flow in the Loop AST element.
LogicCondition
LogicCondition declaration of logical condition operation. It can contains only: and, or. Used for IfCondition element of AST.
LoopBodyStatement
LoopBodyStatement statement of loop-body elements tree of AST. Used as body statement of loop-control flow.
MainStatement
MainStatement main AST statement for all elements.
PrimitiveTypes
PrimitiveTypes primitive types elements of AST. It’s represent basic (primitive) types.
PrimitiveValue
PrimitiveValue represents primitive value element of AST. Values based on primitive types. Used for ConstantValue and ExpressionValue.
Type
Type element of AST. Basic entity that represents types. Basic type entity is:

Constants§

MAX_PRIORITY_LEVEL_FOR_EXPRESSIONS
Max priority level fpr expressions operations

Traits§

GetLocation
GetLocation represent location of source data for AST element. Useful to locate specific source code location, especially for Ident.
GetName
GetName trait, represent name of specific entity.

Type Aliases§

ImportPath
Imports with full path of import
Main
Main