V Algo Lang Parser Visitor
VAlgoLang parser visitor
This class implements the VAlgoLangParserBaseVisitor abstract class returning an abstract syntax tree(AST). Here it traverses the concrete syntax tree (parse tree) to perform semantic analysis, construct the line to statement node map (lineNumberNodeMap) and the AST.
Constructors
VAlgoLangParserVisitor
Link copied to clipboard
fun VAlgoLangParserVisitor()
Content copied to clipboard
Create empty V algo lang parser visitor
Functions
aggregateResult
Link copied to clipboard
open fun aggregateResult(aggregate: ASTNode, nextResult: ASTNode): ASTNode
Content copied to clipboard
defaultResult
Link copied to clipboard
shouldVisitNextChild
Link copied to clipboard
open fun shouldVisitNextChild(node: RuleNode, currentResult: ASTNode): Boolean
Content copied to clipboard
visitAnimationSpeedUpAnnotation
Link copied to clipboard
open override fun visitAnimationSpeedUpAnnotation(ctx: VAlgoLangParser.AnimationSpeedUpAnnotationContext): CodeTrackingNode
Content copied to clipboard
visitAnnotationStatement
Link copied to clipboard
open override fun visitAnnotationStatement(ctx: VAlgoLangParser.AnnotationStatementContext): ASTNode
Content copied to clipboard
visitArgumentList
Link copied to clipboard
open override fun visitArgumentList(ctx: VAlgoLangParser.ArgumentListContext?): ArgumentNode
Content copied to clipboard
visitArray_elem
Link copied to clipboard
open override fun visitArray_elem(ctx: VAlgoLangParser.Array_elemContext): ArrayElemNode
Content copied to clipboard
visitArrayElemAssignment
Link copied to clipboard
open override fun visitArrayElemAssignment(ctx: VAlgoLangParser.ArrayElemAssignmentContext): ASTNode
Content copied to clipboard
visitArrayElemExpr
Link copied to clipboard
open override fun visitArrayElemExpr(ctx: VAlgoLangParser.ArrayElemExprContext): ASTNode
Content copied to clipboard
visitArrayType
Link copied to clipboard
open override fun visitArrayType(ctx: VAlgoLangParser.ArrayTypeContext): ArrayType
Content copied to clipboard
visitAssignmentStatement
Link copied to clipboard
open override fun visitAssignmentStatement(ctx: VAlgoLangParser.AssignmentStatementContext): AssignmentNode
Content copied to clipboard
visitBinaryExpression
Link copied to clipboard
open override fun visitBinaryExpression(ctx: VAlgoLangParser.BinaryExpressionContext): BinaryExpression
Content copied to clipboard
visitBool
Link copied to clipboard
visitBooleanLiteral
Link copied to clipboard
open override fun visitBooleanLiteral(ctx: VAlgoLangParser.BooleanLiteralContext): ASTNode
Content copied to clipboard
visitBoolType
Link copied to clipboard
open override fun visitBoolType(ctx: VAlgoLangParser.BoolTypeContext): ASTNode
Content copied to clipboard
visitBracketedExpression
Link copied to clipboard
open override fun visitBracketedExpression(ctx: VAlgoLangParser.BracketedExpressionContext): ExpressionNode
Content copied to clipboard
visitBreakStatement
Link copied to clipboard
open override fun visitBreakStatement(ctx: VAlgoLangParser.BreakStatementContext): BreakNode
Content copied to clipboard
visitCastExpression
Link copied to clipboard
open override fun visitCastExpression(ctx: VAlgoLangParser.CastExpressionContext): ASTNode
Content copied to clipboard
visitCharacterLiteral
Link copied to clipboard
open override fun visitCharacterLiteral(ctx: VAlgoLangParser.CharacterLiteralContext): ASTNode
Content copied to clipboard
visitCharType
Link copied to clipboard
open override fun visitCharType(ctx: VAlgoLangParser.CharTypeContext?): ASTNode
Content copied to clipboard
visitChildren
Link copied to clipboard
visitCodeTrackingAnnotation
Link copied to clipboard
open override fun visitCodeTrackingAnnotation(ctx: VAlgoLangParser.CodeTrackingAnnotationContext): CodeTrackingNode
Content copied to clipboard
visitConsecutiveStatement
Link copied to clipboard
open override fun visitConsecutiveStatement(ctx: VAlgoLangParser.ConsecutiveStatementContext): ASTNode
Content copied to clipboard
visitContinueStatement
Link copied to clipboard
open override fun visitContinueStatement(ctx: VAlgoLangParser.ContinueStatementContext): ContinueNode
Content copied to clipboard
visitData_structure_initialiser
Link copied to clipboard
open override fun visitData_structure_initialiser(ctx: VAlgoLangParser.Data_structure_initialiserContext): InitialiserNode
Content copied to clipboard
visitDataStructureConstructor
Link copied to clipboard
open override fun visitDataStructureConstructor(ctx: VAlgoLangParser.DataStructureConstructorContext): ASTNode
Content copied to clipboard
visitDataStructureType
Link copied to clipboard
open override fun visitDataStructureType(ctx: VAlgoLangParser.DataStructureTypeContext): DataStructureType
Content copied to clipboard
visitDeclarationStatement
Link copied to clipboard
open override fun visitDeclarationStatement(ctx: VAlgoLangParser.DeclarationStatementContext): DeclarationNode
Content copied to clipboard
visitElseIf
Link copied to clipboard
open override fun visitElseIf(ctx: VAlgoLangParser.ElseIfContext): ASTNode
Content copied to clipboard
visitErrorNode
Link copied to clipboard
visitForStatement
Link copied to clipboard
open override fun visitForStatement(ctx: VAlgoLangParser.ForStatementContext): ASTNode
Content copied to clipboard
visitFunction
Link copied to clipboard
open override fun visitFunction(ctx: VAlgoLangParser.FunctionContext): FunctionNode
Content copied to clipboard
visitFunctionCall
Link copied to clipboard
open override fun visitFunctionCall(ctx: VAlgoLangParser.FunctionCallContext): FunctionCallNode
Content copied to clipboard
visitIdentifier
Link copied to clipboard
open override fun visitIdentifier(ctx: VAlgoLangParser.IdentifierContext): IdentifierNode
Content copied to clipboard
visitIdentifierAssignment
Link copied to clipboard
open override fun visitIdentifierAssignment(ctx: VAlgoLangParser.IdentifierAssignmentContext): ASTNode
Content copied to clipboard
visitIfStatement
Link copied to clipboard
open override fun visitIfStatement(ctx: VAlgoLangParser.IfStatementContext): ASTNode
Content copied to clipboard
visitInitialiser_list
Link copied to clipboard
open override fun visitInitialiser_list(ctx: VAlgoLangParser.Initialiser_listContext): Array2DInitialiserNode
Content copied to clipboard
visitListType
Link copied to clipboard
open override fun visitListType(ctx: VAlgoLangParser.ListTypeContext): ASTNode
Content copied to clipboard
visitLoopStatement
Link copied to clipboard
open override fun visitLoopStatement(ctx: VAlgoLangParser.LoopStatementContext): LoopStatementNode
Content copied to clipboard
visitMethodCall
Link copied to clipboard
open override fun visitMethodCall(ctx: VAlgoLangParser.MethodCallContext): ExpressionNode
Content copied to clipboard
visitMethodCallExpression
Link copied to clipboard
open override fun visitMethodCallExpression(ctx: VAlgoLangParser.MethodCallExpressionContext): ASTNode
Content copied to clipboard
visitMethodCallStatement
Link copied to clipboard
open override fun visitMethodCallStatement(ctx: VAlgoLangParser.MethodCallStatementContext): ASTNode
Content copied to clipboard
visitNode_elem
Link copied to clipboard
open override fun visitNode_elem(ctx: VAlgoLangParser.Node_elemContext): ASTNode
Content copied to clipboard
visitNode_elem_access
Link copied to clipboard
open override fun visitNode_elem_access(ctx: VAlgoLangParser.Node_elem_accessContext): ASTNode
Content copied to clipboard
visitNode_type
Link copied to clipboard
open override fun visitNode_type(ctx: VAlgoLangParser.Node_typeContext): BinaryTreeNodeType
Content copied to clipboard
visitNodeElemAssignment
Link copied to clipboard
open override fun visitNodeElemAssignment(ctx: VAlgoLangParser.NodeElemAssignmentContext): ASTNode
Content copied to clipboard
visitNodeElemExpr
Link copied to clipboard
open override fun visitNodeElemExpr(ctx: VAlgoLangParser.NodeElemExprContext): ASTNode
Content copied to clipboard
visitNodeType
Link copied to clipboard
open override fun visitNodeType(ctx: VAlgoLangParser.NodeTypeContext): BinaryTreeNodeType
Content copied to clipboard
visitNullLiteral
Link copied to clipboard
open override fun visitNullLiteral(ctx: VAlgoLangParser.NullLiteralContext): ASTNode
Content copied to clipboard
visitNumberLiteral
Link copied to clipboard
open override fun visitNumberLiteral(ctx: VAlgoLangParser.NumberLiteralContext): NumberNode
Content copied to clipboard
visitNumberType
Link copied to clipboard
open override fun visitNumberType(ctx: VAlgoLangParser.NumberTypeContext): NumberType
Content copied to clipboard
visitParameter
Link copied to clipboard
open override fun visitParameter(ctx: VAlgoLangParser.ParameterContext): ParameterNode
Content copied to clipboard
visitParameterList
Link copied to clipboard
open override fun visitParameterList(ctx: VAlgoLangParser.ParameterListContext?): ParameterListNode
Content copied to clipboard
visitPrimitiveType
Link copied to clipboard
open override fun visitPrimitiveType(ctx: VAlgoLangParser.PrimitiveTypeContext): PrimitiveType
Content copied to clipboard
visitProgram
Link copied to clipboard
open override fun visitProgram(ctx: VAlgoLangParser.ProgramContext): ProgramNode
Content copied to clipboard
visitRangeHeader
Link copied to clipboard
open override fun visitRangeHeader(ctx: VAlgoLangParser.RangeHeaderContext): ASTNode
Content copied to clipboard
visitReturnStatement
Link copied to clipboard
open override fun visitReturnStatement(ctx: VAlgoLangParser.ReturnStatementContext): ReturnNode
Content copied to clipboard
visitSleepStatement
Link copied to clipboard
open override fun visitSleepStatement(ctx: VAlgoLangParser.SleepStatementContext): SleepNode
Content copied to clipboard
visitStackType
Link copied to clipboard
open override fun visitStackType(ctx: VAlgoLangParser.StackTypeContext): StackType
Content copied to clipboard
visitStringLiteral
Link copied to clipboard
open override fun visitStringLiteral(ctx: VAlgoLangParser.StringLiteralContext): ASTNode
Content copied to clipboard
visitStringType
Link copied to clipboard
open override fun visitStringType(ctx: VAlgoLangParser.StringTypeContext?): ASTNode
Content copied to clipboard
visitSubtitleAnnotation
Link copied to clipboard
open override fun visitSubtitleAnnotation(ctx: VAlgoLangParser.SubtitleAnnotationContext): SubtitleAnnotationNode
Content copied to clipboard
visitTerminal
Link copied to clipboard
visitToCharacter
Link copied to clipboard
open override fun visitToCharacter(ctx: VAlgoLangParser.ToCharacterContext): ASTNode
Content copied to clipboard
visitToNumber
Link copied to clipboard
open override fun visitToNumber(ctx: VAlgoLangParser.ToNumberContext): ASTNode
Content copied to clipboard
visitTreeType
Link copied to clipboard
open override fun visitTreeType(ctx: VAlgoLangParser.TreeTypeContext): BinaryTreeType
Content copied to clipboard
visitUnaryOperator
Link copied to clipboard
open override fun visitUnaryOperator(ctx: VAlgoLangParser.UnaryOperatorContext): UnaryExpression
Content copied to clipboard
visitWhileStatement
Link copied to clipboard
open override fun visitWhileStatement(ctx: VAlgoLangParser.WhileStatementContext): ASTNode
Content copied to clipboard