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 forvalues
re-declaration, to bind new values for already declared values.- Code
Location CodeLocation
code location of source for AST elements. Contains:line
nadposition
.- Constant
Constant
constant declaration element of AST. Basic constant entity contains:- Constant
Expression 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.- Constant
Name ConstantName
constant name forConstant
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.- Expression
Condition ExpressionCondition
expression condition element of AST. Used inExpressionLogicCondition
forIfCondition
declaration. It contains condition between twe expressions.- Expression
Logic Condition - Logic expression condition
- Expression
Struct Value ExpressionStructValue
expression struct value element of AST. Used for expression value declaration. The basic entity is:- Function
Call FunctionCall
function call element of AST. Basic entity for function call representation.- Function
Name FunctionName
function name forFunction
elements of AST.- Function
Parameter FunctionParameter
function parameter element of AST. Used forFunctionStatement
declaration.- Function
Statement 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:- Import
Name - Import name element of AST
- LetBinding
LetBinding
let binding element of AST. Basic entity forvalues
declarations.- Parameter
Name ParameterName
parameter name element of AST, used forFunction
parameters declaration.- Struct
Type StructType
struct type basic element used forStructTypes
. It contains basic elements:- Struct
Types StructTypes
struct type element of AST. Basic entity to declare struct complex types and its attributes.- Value
Name ValueName
value name element of AST. It’s basic entity for:
Enums§
- Body
Statement BodyStatement
one of the basic AST elements. It’s part of Function body.- Condition
Condition
condition declarations. Used forExpressionCondition
. Contains basic condition entities:<. >, ==, <=, >=, !=
- Constant
Value ConstantValue
constant value element of AST. Used forConstantExpression
. Constant value basic entities:- Expression
Operations ExpressionOperations
expression operation element of AST. Used for expression operations:- Expression
Value ExpressionValue
expression value element of AST. Basic entity forExpression
elements of AST. Expression value contains entities:- IfBody
Statement IfBodyStatement
statement of if-body elements tree of AST. Used as body statement of If-control flow.- IfBody
Statements 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:- IfLoop
Body Statement IfLoopBodyStatement
statement of loop-if-body elements tree of AST. Used as body statement of If-control flow in theLoop
AST element.- Logic
Condition LogicCondition
declaration of logical condition operation. It can contains only:and
,or
. Used forIfCondition
element of AST.- Loop
Body Statement LoopBodyStatement
statement of loop-body elements tree of AST. Used as body statement of loop-control flow.- Main
Statement MainStatement
main AST statement for all elements.- Primitive
Types PrimitiveTypes
primitive types elements of AST. It’s represent basic (primitive) types.- Primitive
Value PrimitiveValue
represents primitive value element of AST. Values based on primitive types. Used forConstantValue
andExpressionValue
.- 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 forIdent
.- GetName
GetName
trait, represent name of specific entity.
Type Aliases§
- Import
Path - Imports with full path of import
- Main
- Main