Package org.ek9lang.compiler.common
Class TypeDefResolver
java.lang.Object
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<SymbolSearchConfiguration>
org.ek9lang.antlr.EK9BaseVisitor<SymbolSearchConfiguration>
org.ek9lang.compiler.common.TypeDefResolver
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<SymbolSearchConfiguration>
,EK9Visitor<SymbolSearchConfiguration>
Pass a string of an ek9 typeDef in and use the
EK9 parser to just handle the breaking up of a String of a TypeDef into
a structure and names.
Then use a resolver to see if they type or parameterized type exists.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiontypeDefToSymbol
(String typeDefinition) Use an ek9 parser to accept a String of a typeDef and convert to a symbol (if it can be found).This is really the main entry point to build a structure of SymbolSearchConfiguration that is based on the structure in the ek9 parse tree from typeDef.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, 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, visitTextBlock, visitTextBodyDeclaration, visitTextDeclaration, visitThrowStatement, visitTimeLit, visitTimeLiteral, visitTraitBlock, visitTraitDeclaration, visitTraitPreamble, visitTraitReference, visitTraitsList, visitTryStatementExpression, visitTypeBlock, visitTypeDeclaration, 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
-
TypeDefResolver
Create new resolver.
-
-
Method Details
-
typeDefToSymbol
Use an ek9 parser to accept a String of a typeDef and convert to a symbol (if it can be found). -
visitTypeDef
This is really the main entry point to build a structure of SymbolSearchConfiguration that is based on the structure in the ek9 parse tree from typeDef.- Specified by:
visitTypeDef
in interfaceEK9Visitor<SymbolSearchConfiguration>
- Overrides:
visitTypeDef
in classEK9BaseVisitor<SymbolSearchConfiguration>
- Parameters:
ctx
- the parse tree- Returns:
- the visitor result
-