Package com.valgolang.frontend.ast

Types

AddExpression
Link copied to clipboard
data class AddExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression, ComparableTypes
Add expression
AndExpression
Link copied to clipboard
data class AndExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
And expression
AnimationNode
Link copied to clipboard
sealed class AnimationNode : StatementNode
Animation nodeRepresents a node that customises the animation
AnnotationBlockNode
Link copied to clipboard
sealed class AnnotationBlockNode : NoRenderAnimationNode
Annotation block nodeRefers to nodes that wrap an annotation block
ArgumentNode
Link copied to clipboard
data class ArgumentNode(arguments: List<ExpressionNode>) : ASTNode
Argument nodeArguments passed into method/function calls
AssignLHS
Link copied to clipboard
interface AssignLHS
Assign lhsRepresents node that can be on the lhs of an assignment '='
AssignmentNode
Link copied to clipboard
data class AssignmentNode(lineNumber: Int, identifier: AssignLHS, expression: ExpressionNode) : CodeNode, DeclarationOrAssignment
Assignment node
ASTNode
Link copied to clipboard
open class ASTNode
AST nodeCollectively represents the abstract syntax tree of the program.
BinaryExpression
Link copied to clipboard
sealed class BinaryExpression : ExpressionNode
Binary expression
BoolNode
Link copied to clipboard
data class BoolNode(lineNumber: Int, value: Boolean) : ExpressionNode
Bool nodeRepresents a boolean value
BoolType
Link copied to clipboard
object BoolType : PrimitiveType
BreakNode
Link copied to clipboard
data class BreakNode(lineNumber: Int, loopEndLineNumber: Int) : LoopStatementNode
Break node
CastExpressionNode
Link copied to clipboard
data class CastExpressionNode(lineNumber: Int, targetType: PrimitiveType, expr: ExpressionNode) : ExpressionNode
Cast expression node
CharNode
Link copied to clipboard
data class CharNode(lineNumber: Int, value: Char) : ExpressionNode
Char nodeRepresents a character value
CharType
Link copied to clipboard
object CharType : PrimitiveType
CodeNode
Link copied to clipboard
abstract class CodeNode(lineNumber: Int) : StatementNode
Code nodeA node that represents a line of code in the input file
CodeTrackingNode
Link copied to clipboard
data class CodeTrackingNode(lineNumber: Int, endLineNumber: Int, statements: List<StatementNode>) : NoRenderAnimationNode
Code tracking nodeWraps statements held in a annotation block node.
ComparableTypes
Link copied to clipboard
interface ComparableTypes
Comparable types
ConsecutiveStatementNode
Link copied to clipboard
data class ConsecutiveStatementNode(stat1: StatementNode, stat2: StatementNode) : StatementNode
Consecutive statement nodeRecursive statement node which wraps two consecutive statements
ContinueNode
Link copied to clipboard
data class ContinueNode(lineNumber: Int, loopStartLineNumber: Int) : LoopStatementNode
Continue node
DeclarationNode
Link copied to clipboard
data class DeclarationNode(lineNumber: Int, identifier: AssignLHS, expression: ExpressionNode) : CodeNode, DeclarationOrAssignment
Declaration node
DeclarationOrAssignment
Link copied to clipboard
interface DeclarationOrAssignment
Declaration or assignment
DivideExpression
Link copied to clipboard
data class DivideExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression, ComparableTypes
Divide expression
ElifNode
Link copied to clipboard
data class ElifNode(lineNumber: Int, scope: Int, condition: ExpressionNode, statements: List<StatementNode>) : StatementBlock
Elif node
ElseNode
Link copied to clipboard
data class ElseNode(lineNumber: Int, scope: Int, statements: List<StatementNode>) : StatementBlock
Else node
EmptyInitialiserNode
Link copied to clipboard
object EmptyInitialiserNode : InitialiserNode
EmptyLHS
Link copied to clipboard
object EmptyLHS : AssignLHS
EqExpression
Link copied to clipboard
data class EqExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Eq expression
ErrorType
Link copied to clipboard
object ErrorType : Type
ExpressionNode
Link copied to clipboard
abstract class ExpressionNode(lineNumber: Int) : CodeNode
Expression nodeRepresents expressions in VAlgoLang
ForStatementNode
Link copied to clipboard
data class ForStatementNode(lineNumber: Int, endLineNumber: Int, scope: Int, beginStatement: DeclarationNode, endCondition: ExpressionNode, updateCounter: AssignmentNode, statements: List<StatementNode>) : LoopNode
For statement node
FunctionCallNode
Link copied to clipboard
data class FunctionCallNode(lineNumber: Int, functionIdentifier: String, arguments: List<ExpressionNode>) : ExpressionNode
Function call node
FunctionNode
Link copied to clipboard
data class FunctionNode(lineNumber: Int, scope: Int, identifier: String, parameters: List<ParameterNode>, statements: List<StatementNode>) : CodeNode
Function nodeRepresents a function declaration
GeExpression
Link copied to clipboard
data class GeExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Ge expression
GtExpression
Link copied to clipboard
data class GtExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Gt expression
IdentifierNode
Link copied to clipboard
data class IdentifierNode(lineNumber: Int, identifier: String) : ExpressionNode, AssignLHS
Identifier nodeIdentifies a variable
IfStatementNode
Link copied to clipboard
data class IfStatementNode(lineNumber: Int, endLineNumber: Int, scope: Int, condition: ExpressionNode, statements: List<StatementNode>, elifs: List<ElifNode>, elseBlock: ElseNode) : StatementBlock
If statement node
InitialiserNode
Link copied to clipboard
abstract class InitialiserNode : ASTNode
Initialiser node
LeExpression
Link copied to clipboard
data class LeExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Le expression
LoopNode
Link copied to clipboard
sealed class LoopNode : StatementBlock
Loop node
LoopStatementNode
Link copied to clipboard
sealed class LoopStatementNode : CodeNode
Loop statement node
LtExpression
Link copied to clipboard
data class LtExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Lt expression
MinusExpression
Link copied to clipboard
data class MinusExpression(lineNumber: Int, expr: ExpressionNode) : UnaryExpression
Minus expression
MultiplyExpression
Link copied to clipboard
data class MultiplyExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression, ComparableTypes
Multiply expression
NeqExpression
Link copied to clipboard
data class NeqExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Neq expression
NoRenderAnimationNode
Link copied to clipboard
sealed class NoRenderAnimationNode : AnimationNode
No render animation nodeAnimation node that should not be rendered in the code block when animated.
NotExpression
Link copied to clipboard
data class NotExpression(lineNumber: Int, expr: ExpressionNode) : UnaryExpression
Not expression
NullNode
Link copied to clipboard
data class NullNode(lineNumber: Int) : ExpressionNode
Null node
NullType
Link copied to clipboard
object NullType : Type
NumberNode
Link copied to clipboard
data class NumberNode(lineNumber: Int, double: Double) : ExpressionNode
Number nodeRepresents a number
NumberType
Link copied to clipboard
object NumberType : PrimitiveType
OrExpression
Link copied to clipboard
data class OrExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression
Or expression
ParameterListNode
Link copied to clipboard
data class ParameterListNode(parameters: List<ParameterNode>) : ASTNode
Parameter list nodeList of parameters for functions
ParameterNode
Link copied to clipboard
data class ParameterNode(identifier: String, type: Type) : ASTNode
Parameter nodeAn identifier and type representing a parameter of a function
PlusExpression
Link copied to clipboard
data class PlusExpression(lineNumber: Int, expr: ExpressionNode) : UnaryExpression
Plus expression
PrimitiveType
Link copied to clipboard
sealed class PrimitiveType : Type
Primitive typeA primitive type in VAlgoLang e.g.
ProgramNode
Link copied to clipboard
data class ProgramNode(functions: List<FunctionNode>, statements: List<StatementNode>) : ASTNode
Program nodeRoot level AST node that represents the program in its entirety
ReturnNode
Link copied to clipboard
data class ReturnNode(lineNumber: Int, expression: ExpressionNode) : CodeNode
Return node
SleepNode
Link copied to clipboard
data class SleepNode(lineNumber: Int, sleepTime: ExpressionNode) : NoRenderAnimationNode
Sleep nodeAdds wait to animation
StartCodeTrackingNode
Link copied to clipboard
data class StartCodeTrackingNode(lineNumber: Int, isStepInto: Boolean, condition: ExpressionNode) : AnnotationBlockNode
Start code tracking nodeUsed to mark where in the program a stepInto/stepOver starts
StartSpeedChangeNode
Link copied to clipboard
data class StartSpeedChangeNode(lineNumber: Int, speedChange: ExpressionNode, condition: ExpressionNode) : AnnotationBlockNode
Start speed change nodeUsed to mark where in the program a speed block starts
StatementBlock
Link copied to clipboard
sealed class StatementBlock : CodeNode
Statement block
StatementNode
Link copied to clipboard
abstract class StatementNode(lineNumber: Int) : ASTNode
Statement nodeRepresents a statement that constitutes the program
StopCodeTrackingNode
Link copied to clipboard
data class StopCodeTrackingNode(lineNumber: Int, isStepInto: Boolean, condition: ExpressionNode) : AnnotationBlockNode
Stop code tracking nodeMarks end of stepInto/stepOver block.
StopSpeedChangeNode
Link copied to clipboard
data class StopSpeedChangeNode(lineNumber: Int, condition: ExpressionNode) : AnnotationBlockNode
Stop speed change nodeUsed to mark where in the program a speed block ends
StringNode
Link copied to clipboard
data class StringNode(lineNumber: Int, value: String) : ExpressionNode
String nodeRepresents a string value
StringType
Link copied to clipboard
object StringType : PrimitiveType
SubtitleAnnotationNode
Link copied to clipboard
data class SubtitleAnnotationNode(lineNumber: Int, text: ExpressionNode, duration: ExpressionNode?, condition: ExpressionNode, showOnce: Boolean) : AnnotationBlockNode
Subtitle annotation nodeAdds subtitle to with text to final animation
SubtractExpression
Link copied to clipboard
data class SubtractExpression(lineNumber: Int, expr1: ExpressionNode, expr2: ExpressionNode) : BinaryExpression, ComparableTypes
Subtract expression
Type
Link copied to clipboard
abstract class Type : ASTNode
TypeRepresents types
UnaryExpression
Link copied to clipboard
sealed class UnaryExpression : ExpressionNode
Unary expression
VoidNode
Link copied to clipboard
data class VoidNode(lineNumber: Int) : ExpressionNode
Void nodeRepresents a void value e.g.
VoidType
Link copied to clipboard
object VoidType : Type
WhileStatementNode
Link copied to clipboard
data class WhileStatementNode(lineNumber: Int, endLineNumber: Int, scope: Int, condition: ExpressionNode, statements: List<StatementNode>) : LoopNode
While statement node