CandidVisitor<T> class
abstract
This abstract class defines a complete generic visitor for a parse tree produced by CandidParser.
T
is the eturn type of the visit operation. Use void
for
operations with no return type.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
aggregateResult(
T? aggregate, T? nextResult) → T? -
Aggregates the results of visiting multiple children of a node. After
either all children are visited or {@link #shouldVisitNextChild} returns
false
, the aggregate value is returned as the result of {@link #visitChildren}.inherited -
defaultResult(
) → T? -
Gets the default value returned by visitor methods. This value is
returned by the default implementations of
{@link #visitTerminal visitTerminal}, {@link #visitErrorNode visitErrorNode}.
The default implementation of {@link #visitChildren visitChildren}
initializes its aggregate result to this value.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldVisitNextChild(
RuleNode node, T? currentResult) → bool -
This method is called after visiting each child in
{@link #visitChildren}. This method is first called before the first
child is visited; at that point
currentResult
will be the initial value (in the default implementation, the initial value is returned by a call to {@link #defaultResult}. This method is not called after the last child is visited.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
visit(
ParseTree tree) → T? -
{@inheritDoc}
inherited
-
visitActor(
ActorContext ctx) → T? -
Visit a parse tree produced by CandidParser.actor.
ctx
the parse tree. Return the visitor result. -
visitActorType(
ActorTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.actorType.
ctx
the parse tree. Return the visitor result. -
visitBlobType(
BlobTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.blobType.
ctx
the parse tree. Return the visitor result. -
visitBoolType(
BoolTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.boolType.
ctx
the parse tree. Return the visitor result. -
visitChildren(
RuleNode node) → T? -
{@inheritDoc}
inherited
-
visitDataType(
DataTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.dataType.
ctx
the parse tree. Return the visitor result. -
visitDef(
DefContext ctx) → T? -
Visit a parse tree produced by CandidParser.def.
ctx
the parse tree. Return the visitor result. -
visitEmptyType(
EmptyTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.emptyType.
ctx
the parse tree. Return the visitor result. -
visitErrorNode(
ErrorNode node) → T? -
{@inheritDoc}
inherited
-
visitExprType(
ExprTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.exprType.
ctx
the parse tree. Return the visitor result. -
visitFloatType(
FloatTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.floatType.
ctx
the parse tree. Return the visitor result. -
visitFuncAnn(
FuncAnnContext ctx) → T? -
Visit a parse tree produced by CandidParser.funcAnn.
ctx
the parse tree. Return the visitor result. -
visitFuncType(
FuncTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.funcType.
ctx
the parse tree. Return the visitor result. -
visitId(
IdContext ctx) → T? -
Visit a parse tree produced by CandidParser.id.
ctx
the parse tree. Return the visitor result. -
visitIdType(
IdTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.idType.
ctx
the parse tree. Return the visitor result. -
visitImp(
ImpContext ctx) → T? -
Visit a parse tree produced by CandidParser.imp.
ctx
the parse tree. Return the visitor result. -
visitImportPart(
ImportPartContext ctx) → T? -
Visit a parse tree produced by CandidParser.importPart.
ctx
the parse tree. Return the visitor result. -
visitIntType(
IntTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.intType.
ctx
the parse tree. Return the visitor result. -
visitMethType(
MethTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.methType.
ctx
the parse tree. Return the visitor result. -
visitNatType(
NatTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.natType.
ctx
the parse tree. Return the visitor result. -
visitNull(
NullContext ctx) → T? -
Visit a parse tree produced by
CandidParser.null
.ctx
the parse tree. Return the visitor result. -
visitNumberType(
NumberTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.numberType.
ctx
the parse tree. Return the visitor result. -
visitOptType(
OptTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.optType.
ctx
the parse tree. Return the visitor result. -
visitPairType(
PairTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.pairType.
ctx
the parse tree. Return the visitor result. -
visitPrimType(
PrimTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.primType.
ctx
the parse tree. Return the visitor result. -
visitPrincipalType(
PrincipalTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.principalType.
ctx
the parse tree. Return the visitor result. -
visitProg(
ProgContext ctx) → T? -
Visit a parse tree produced by CandidParser.prog.
ctx
the parse tree. Return the visitor result. -
visitRecordType(
RecordTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.recordType.
ctx
the parse tree. Return the visitor result. -
visitRefType(
RefTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.refType.
ctx
the parse tree. Return the visitor result. -
visitReservedType(
ReservedTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.reservedType.
ctx
the parse tree. Return the visitor result. -
visitTerminal(
TerminalNode node) → T? -
{@inheritDoc}
inherited
-
visitTextType(
TextTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.textType.
ctx
the parse tree. Return the visitor result. -
visitTupleType(
TupleTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.tupleType.
ctx
the parse tree. Return the visitor result. -
visitVariantType(
VariantTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.variantType.
ctx
the parse tree. Return the visitor result. -
visitVecType(
VecTypeContext ctx) → T? -
Visit a parse tree produced by CandidParser.vecType.
ctx
the parse tree. Return the visitor result.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited