Package org.ek9lang.compiler.common
Class Ek9SourceVisitor
java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<Void>
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<Void>
,EK9Visitor<Void>
A cut down visitor that just deals with packages at a basic level.
Now refactored the results of the visit out to an immutable record,
so the private properties in this visitor are now transient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
visit
(EK9Parser.CompilationUnitContext context, ErrorListener errorListener) This is the key to lexing and parsing the source file mainly just for package information.Visit a parse tree produced byEK9Parser.moduleDeclaration()
.Visit a parse tree produced byEK9Parser.packageBlock()
.Visit a parse tree produced byEK9Parser.programBlock()
.Methods inherited from class org.ek9lang.antlr.EK9BaseVisitor
visitAccessModifier, visitAggregateParts, visitAggregateProperty, visitAllowingOnly, visitApplicationBlock, visitApplicationDeclaration, visitArgumentParam, visitAspectDeclaration, visitAssertStatement, visitAssignmentExpression, visitAssignmentStatement, visitBinaryLit, visitBinaryLiteral, visitBlock, visitBlockStatement, visitBooleanLit, visitBooleanLiteral, visitCall, visitCaseExpression, visitCaseStatement, visitCatchStatementExpression, visitCharacterLit, visitCharacterLiteral, visitClassBlock, visitClassDeclaration, visitColourLit, visitColourLiteral, visitCompilationUnit, visitComponentBlock, visitComponentDeclaration, visitConstantBlock, visitConstantDeclaration, visitConstantInitialiser, visitConstrainDeclaration, visitConstrainType, visitDateLit, visitDateLiteral, visitDateTimeLit, visitDateTimeLiteral, visitDeclareArgumentParam, visitDecorationDimensionLiteral, visitDecorationResolutionLiteral, visitDefaultOperator, visitDict, visitDimensionLit, visitDirective, visitDirectivePart, visitDottedName, visitDurationLit, visitDurationLiteral, visitDynamicClassDeclaration, visitDynamicFunctionBody, visitDynamicFunctionDeclaration, visitDynamicVariableCapture, visitElseOnlyBlock, visitEnumerationDeclaration, visitExpression, visitExpressionParam, visitExtendDeclaration, visitExtendPreamble, visitFinallyStatementExpression, visitFloatingPointLit, visitFloatingPointLiteral, visitForLoop, visitForRange, visitForStatementExpression, visitFunctionBlock, visitFunctionDeclaration, visitGuardExpression, visitHttpAccess, visitHttpVerb, visitIdentifier, visitIdentifierReference, visitIfControlBlock, visitIfStatement, visitInitValuePair, visitInstructionBlock, visitIntegerLit, visitIntegerLiteral, visitList, visitMethodDeclaration, visitMillisecondLit, visitMillisecondLiteral, visitModuleBlock, visitMoneyLit, visitMoneyLiteral, visitObjectAccess, visitObjectAccessExpression, visitObjectAccessStart, visitObjectAccessType, visitOperationCall, visitOperationDetails, visitOperator, visitOperatorDeclaration, visitParameterisedArgs, visitParameterisedDetail, visitParameterisedParams, visitParameterisedType, visitParamExpression, visitPathLit, visitPathLiteral, visitPipelinePart, visitPreFlowAndControl, visitPreFlowStatement, visitPrimary, visitPrimaryReference, visitRange, visitRecordBlock, visitRecordDeclaration, visitReferencesBlock, visitRegExLit, visitRegisterStatement, visitRegularExpressionLiteral, visitResolutionLit, visitReturningParam, visitServiceBlock, visitServiceDeclaration, visitServiceOperationDeclaration, visitSheBang, visitSingleStatementBlock, visitStatement, visitStreamCat, visitStreamExpression, visitStreamExpressionTermination, visitStreamFor, visitStreamPart, visitStreamSource, visitStreamStatement, visitStreamStatementTermination, visitStringLit, visitStringLiteral, visitStringPart, visitSwitchStatementExpression, visitTextBlock, visitTextBodyDeclaration, visitTextDeclaration, visitThrowStatement, visitTimeLit, visitTimeLiteral, visitTraitBlock, visitTraitDeclaration, visitTraitPreamble, visitTraitReference, visitTraitsList, visitTryStatementExpression, visitTypeBlock, visitTypeDeclaration, visitTypeDef, visitVariableDeclaration, visitVariableOnlyDeclaration, visitVersionNumberLit, visitVersionNumberLiteral, visitWebVariableCorrelation, visitWhileStatementExpression
Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
Ek9SourceVisitor
public Ek9SourceVisitor()
-
-
Method Details
-
visit
This is the key to lexing and parsing the source file mainly just for package information. -
getPackageDetails
-
visitModuleDeclaration
Description copied from class:EK9BaseVisitor
Visit a parse tree produced byEK9Parser.moduleDeclaration()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitModuleDeclaration
in interfaceEK9Visitor<Void>
- Overrides:
visitModuleDeclaration
in classEK9BaseVisitor<Void>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitProgramBlock
Description copied from class:EK9BaseVisitor
Visit a parse tree produced byEK9Parser.programBlock()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitProgramBlock
in interfaceEK9Visitor<Void>
- Overrides:
visitProgramBlock
in classEK9BaseVisitor<Void>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-
visitPackageBlock
Description copied from class:EK9BaseVisitor
Visit a parse tree produced byEK9Parser.packageBlock()
.The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
onctx
.- Specified by:
visitPackageBlock
in interfaceEK9Visitor<Void>
- Overrides:
visitPackageBlock
in classEK9BaseVisitor<Void>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-