Class IRDefinitionVisitor
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<INode>
,EK9Visitor<INode>
The concept is to move away from the EK9 grammar, syntax and semantics. But does not move too far towards any concrete final output.
So for example, everything in the IR will become some form of 'struct with operations'. This includes all types of EK9 aggregates and even EK9 functions (as they can hold state).
Constants and actual EK9 functions will just be 'instances' of these 'struct with operations'.
Another example is 'for loops', 'while loops' and 'do while loops'. These will all be defined in terms of executable blocks, with a 'condition' (that will appear in different locations) and a 'Marker' for the start and end. So, here this is moving well towards something that can be implemented in some form of machine/byte code.
Guards will also be broken down into 'basic blocks' with labels and a condition.
-
Constructor Summary
ConstructorsConstructorDescriptionIRDefinitionVisitor
(SharedThreadContext<CompilableProgram> compilableProgramAccess, CompilableSource source, IRModule irModule) -
Method Summary
Modifier and TypeMethodDescriptionDeals with method declarations and the specific case of EK9 programs.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, visitMillisecondLit, visitMillisecondLiteral, visitModuleBlock, visitModuleDeclaration, visitMoneyLit, visitMoneyLiteral, visitObjectAccess, visitObjectAccessExpression, visitObjectAccessStart, visitObjectAccessType, visitOperationCall, visitOperationDetails, visitOperator, visitOperatorDeclaration, visitPackageBlock, visitParameterisedArgs, visitParameterisedDetail, visitParameterisedParams, visitParameterisedType, visitParamExpression, visitPathLit, visitPathLiteral, visitPipelinePart, visitPreFlowAndControl, visitPreFlowStatement, visitPrimary, visitPrimaryReference, visitProgramBlock, 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, visitTernaryPart, 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
-
Method Details
-
visitMethodDeclaration
Deals with method declarations and the specific case of EK9 programs.- Specified by:
visitMethodDeclaration
in interfaceEK9Visitor<INode>
- Overrides:
visitMethodDeclaration
in classEK9BaseVisitor<INode>
- Parameters:
ctx
- the parse tree context that defines the method details.- Returns:
- An INode that represents the EK9 structure to be employed.
-