The ezr² Project 0.1.1
The codebase for the ezr² programming language.
|
Classes | |
class | InvalidNode |
The dummy invalid Node structure. For returning instead of null if an SyntaxError occurs during parsing. More... | |
Functions | |
class | Node (Position startPosition, Position endPosition) |
The representation of an ezr² source code construct. This is the base class of all nodes. Only for inheritance! | |
class | ArrayLikeNode (List< Node > elements, bool createList, Position startPosition, Position endPosition) |
The Node structure for an arraylike (array or list). | |
class | DictionaryNode (List<(Node Key, Node Value)> keyValuePairs, Position startPosition, Position endPosition) |
The Node structure for a dictionary. | |
class | DefineBlockNode (Node body, AccessMod accessibilityModifiers, Position startPosition, Position endPosition) |
The Node structure for a define block. | |
class | VariableAccessNode (Token name, AccessMod accessibilityModifiers, Position startPosition, Position endPosition) |
The Node structure for accesing a variable from the context. | |
class | VariableAssignmentNode (Node variable, TokenType assignmentOperator, Node value, AccessMod accessibilityModifiers, Position startPosition, Position endPosition) |
The Node structure for assigning a value to a variable in the context. | |
class | CountNode (Node to, Node? from, Node? step, Node? iterationVariable, Node body, Position startPosition, Position endPosition) |
The Node structure for a count expression. | |
class | IfNode (List<(Node Condition, Node Body)> cases, Node? elseCase, Position startPosition, Position endPosition) |
The Node structure for an if expression. | |
class | TryNode (Node block, List<(Node ErrorType, Node? Variable, Node Body)> cases,(Node? Variable, Node Body)? emptyCase, Position startPosition, Position endPosition) |
The Node structure for a try expression. | |
class | WhileNode (Node condition, Node body, Position startPosition, Position endPosition) |
The Node structure for an while expression. | |
class | CallNode (Node receiver, List< Node > arguments, Position startPosition, Position endPosition) |
The Node structure for a function call. | |
class | ClassDefinitionNode (Node? name, AccessMod accessibilityModifiers, bool @readonly, List< Node > parents, Node body, Position startPosition, Position endPosition) |
The Node structure for a class definition. | |
class | FunctionDefinitionNode (Node? name, AccessMod accessibilityModifiers, bool returnLast, List< Node > parameters, Node? keywordArguments, Node body, Position startPosition, Position endPosition) |
The Node structure for a function definition. | |
class | IncludeNode (Node script, Node? subStructure, bool isDumped, Node? nickname, Position startPosition, Position endPosition) |
The Node structure for an include expression. | |
class | ReturnNode (Node? value, bool returnLast, Position startPosition, Position endPosition) |
The Node structure for a return statement. | |
class | BinaryOperationNode (Node left, Node right, TokenType @operator, Position startPosition, Position endPosition) |
The Node structure for a binary operation. | |
class | UnaryOperationNode (Node operand, TokenType @operator, Position startPosition, Position endPosition) |
The Node structure for a unary operation. | |
class | NoValueNode (TokenType valueType, Position startPosition, Position endPosition) |
The Node structure for a statement or expression without any value (used as skip and stop statement nodes). | |
class | ValueNode (Token value, Position startPosition, Position endPosition) |
The Node structure of a simple value like literals and variables. | |
class EzrSquared.Runtime.Nodes.ArrayLikeNode | ( | List< Node > | elements, |
bool | createList, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for an arraylike (array or list).
elements | The elements of the arraylike. |
createList | The check for if the ArrayLikeNode should create a list instead of an array. |
startPosition | The starting Position of the ArrayLikeNode. |
endPosition | The ending Position of the ArrayLikeNode. |
The elements of the arraylike.
The check for if the ArrayLikeNode should create a list instead of an array.
Creates a string representation of the ArrayLikeNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.BinaryOperationNode | ( | Node | left, |
Node | right, | ||
TokenType @ | operator, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a binary operation.
left | The first operand of the binary operation. |
right | The second operand of the binary operation. |
operator | The operator TokenType of the binary operation. |
startPosition | The starting Position of the BinaryOperationNode. |
endPosition | The ending Position of the BinaryOperationNode. |
The first operand of the binary operation.
The second operand of the binary operation.
The operator TokenType of the binary operation.
Creates a string representation of the BinaryOperationNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.CallNode | ( | Node | receiver, |
List< Node > | arguments, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a function call.
receiver | The function/object to be called. |
arguments | The array of arguments. |
startPosition | The starting Position of the CallNode. |
endPosition | The ending Position of the CallNode. |
The function/object to be called.
The array of arguments.
Creates a string representation of the CallNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.ClassDefinitionNode | ( | Node? | name, |
AccessMod | accessibilityModifiers, | ||
bool @ | readonly, | ||
List< Node > | parents, | ||
Node | body, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a class definition.
name | The (optional) name of the class. |
accessibilityModifiers | The accessibility modifiers for the class definition. |
readonly | The check for if the class should be declared read-only. |
parents | The parents of the class. |
body | The body of the class. |
startPosition | The starting Position of the ClassDefinitionNode. |
endPosition | The ending Position of the ClassDefinitionNode. |
The name of the class. May be null
.
The accessibility modifiers for the class definition.
The check for if the class should be declared read-only.
The parents of the class.
The body of the class.
Creates a string representation of the ClassDefinitionNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.CountNode | ( | Node | to, |
Node? | from, | ||
Node? | step, | ||
Node? | iterationVariable, | ||
Node | body, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a count expression.
to | The amount to count to. |
from | The amount to count from - optional. |
step | The increment of each iteration - optional. |
iterationVariable | TThe variable to store the iteration number in - optional. |
body | The body of the count loop. |
startPosition | The starting Position of the CountNode. |
endPosition | The ending Position of the CountNode. |
The amount to count to.
The amount to count from - optional.
The increment of each iteration - optional.
The variable to store the iteration number in - optional.
The body of the count loop.
Creates a string representation of the CountNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.DefineBlockNode | ( | Node | body, |
AccessMod | accessibilityModifiers, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a define block.
body | The body of the block. |
accessibilityModifiers | The accessibility modifiers for the define block. |
startPosition | The starting Position of the DefineBlockNode. |
endPosition | The ending Position of the DefineBlockNode. |
The body of the block.
The accessibility modifiers of the define block.
Creates a string representation of the DefineBlockNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.DictionaryNode | ( | List<(Node Key, Node Value)> | keyValuePairs, |
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a dictionary.
keyValuePairs | The key-value pairs of the dictionary. |
startPosition | The starting Position of the DictionaryNode. |
endPosition | The ending Position of the DictionaryNode. |
The key-value pairs of the dictionary.
Creates a string representation of the DictionaryNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.FunctionDefinitionNode | ( | Node? | name, |
AccessMod | accessibilityModifiers, | ||
bool | returnLast, | ||
List< Node > | parameters, | ||
Node? | keywordArguments, | ||
Node | body, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a function definition.
name | The (optional) name of the function. |
accessibilityModifiers | The accessibility modifiers for the function definition. |
returnLast | The check for if the last expression of the function should be returned as its result. Only used in oneliners. |
parameters | The parameters of the function. |
keywordArguments | The reference to store the extra keyword arguments in. |
body | The body of the function. |
startPosition | The starting Position of the FunctionDefinitionNode. |
endPosition | The ending Position of the FunctionDefinitionNode. |
The (optional) name of the function.
The accessibility modifiers for the function definition.
The check for if the last expression of the function should be returned as its result. Only used in oneliners.
The parameters of the function.
The reference to store the extra keyword arguments in.
The body of the function.
Creates a string representation of the FunctionDefinitionNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.IfNode | ( | List<(Node Condition, Node Body)> | cases, |
Node? | elseCase, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for an if expression.
cases | The cases of the if expression. |
elseCase | The body of the else case. |
startPosition | The starting Position of the IfNode. |
endPosition | The ending Position of the IfNode. |
The cases of the if expression.
The body of the else case.
Creates a string representation of the IfNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.IncludeNode | ( | Node | script, |
Node? | subStructure, | ||
bool | isDumped, | ||
Node? | nickname, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for an include expression.
script | The script to include. |
subStructure | The (optional) specific sub-structure or object to be included from the script. |
isDumped | Specifies if all contents of the script need to be dumped into the current context. |
nickname | The (optional) nickname of the object to be included. |
startPosition | The starting Position of the IncludeNode. |
endPosition | The ending Position of the IncludeNode. |
The script to include.
The (optional) specific sub-structure or object to be included from the script.
Specifies if all contents of the script need to be dumped into the current context.
The (optional) nickname of the object to be included.
Creates a string representation of the IncludeNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
The representation of an ezr² source code construct. This is the base class of all nodes. Only for inheritance!
startPosition | The starting Position of the Node. |
endPosition | The ending Position of the Node. |
The starting Position of the Node.
The ending Position of the Node.
Creates a string representation of the Node.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.NoValueNode | ( | TokenType | valueType, |
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a statement or expression without any value (used as skip and stop statement nodes).
valueType | The identifying TokenType of the NoValueNode. |
startPosition | The starting Position of the NoValueNode. |
endPosition | The ending Position of the NoValueNode. |
The identifying TokenType of the NoValueNode.
Creates a string representation of the NoValueNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.ReturnNode | ( | Node? | value, |
bool | returnLast, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a return statement.
value | The optional value to be returned. |
returnLast | Return the last element of Value, which should be a list or array. |
startPosition | The starting Position of the ReturnNode. |
endPosition | The ending Position of the ReturnNode. |
The optional value to be returned.
Return the last element of Value, which should be a list or array.
Creates a string representation of the ReturnNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.TryNode | ( | Node | block, |
List<(Node ErrorType, Node? Variable, Node Body)> | cases, | ||
(Node? Variable, Node Body)? | emptyCase, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a try expression.
block | The try block. |
cases | The error cases of the try expression. |
emptyCase | The (optional) Node where the error will be stored and the body of the empty else case. |
startPosition | The starting Position of the TryNode. |
endPosition | The ending Position of the TryNode. |
The try block.
The error cases of the try expression.
The (optional) Node where the error will be stored and the body of the empty else case.
Creates a string representation of the TryNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.UnaryOperationNode | ( | Node | operand, |
TokenType @ | operator, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for a unary operation.
operand | The operand of the unary operation. |
operator | The operator TokenType of the unary operation. |
startPosition | The starting Position of the UnaryOperationNode. |
endPosition | The ending Position of the UnaryOperationNode. |
The operand of the unary operation.
The operator TokenType of the unary operation.
Creates a string representation of the UnaryOperationNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.ValueNode | ( | Token | value, |
Position | startPosition, | ||
Position | endPosition ) |
The Node structure of a simple value like literals and variables.
value | The Token value the ValueNode represents. |
startPosition | The starting Position of the ValueNode. |
endPosition | The ending Position of the ValueNode. |
The value the ValueNode represents.
Creates a string representation of the ValueNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.VariableAccessNode | ( | Token | name, |
AccessMod | accessibilityModifiers, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for accesing a variable from the context.
name | The name of the variable, a Token object of type TokenType.Identifier. |
accessibilityModifiers | The accessibility modifiers for the variable access operation. |
startPosition | The starting Position of the VariableAccessNode. |
endPosition | The ending Position of the VariableAccessNode. |
The name of the variable to access.
The accessibility modifiers for the variable access operation.
Creates a string representation of the VariableAccessNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.VariableAssignmentNode | ( | Node | variable, |
TokenType | assignmentOperator, | ||
Node | value, | ||
AccessMod | accessibilityModifiers, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for assigning a value to a variable in the context.
variable | The variable to be assigned to. |
assignmentOperator | The operation TokenType, if not TokenType.Colon, between the existing value of variable and value . The result of the operation will be assigned to variable . |
value | The value to be assigned to Variable. |
accessibilityModifiers | The accessibility modifiers for the variable assignment operation. |
startPosition | The starting Position of the VariableAssignmentNode. |
endPosition | The ending Position of the VariableAssignmentNode. |
The variable to be assigned to.
The operation TokenType, if not TokenType.Colon, between the existing value of Variable and Value. The result of the operation will be assigned to Variable.
The value to be assigned to Variable.
The accessibility modifiers for the variable assignment operation.
Creates a string representation of the VariableAssignmentNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".
class EzrSquared.Runtime.Nodes.WhileNode | ( | Node | condition, |
Node | body, | ||
Position | startPosition, | ||
Position | endPosition ) |
The Node structure for an while expression.
condition | The condition of the while loop. |
body | The body of the while loop. |
startPosition | The starting Position of the WhileNode. |
endPosition | The ending Position of the WhileNode. |
The condition of the while loop.
The body of the while loop.
Creates a string representation of the WhileNode.
All fields excluding the start and end positions are included in the representation, like "ExampleNode(Property1, Property2)".