Class karelBaseVisitor<Result>
This class provides an empty implementation of IkarelVisitor<Result>, which can be extended to create a visitor which only needs to handle a subset of the available methods.
Inheritance
Namespace: GCore.Antlr.Grammers.Karel
Assembly: Karel.dll
Syntax
public class karelBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, IkarelVisitor<Result>, IParseTreeVisitor<Result>
Type Parameters
Name | Description |
---|---|
Result | The return type of the visit operation. |
Methods
| Improve this Doc View SourceVisitBlock(karelParser.BlockContext)
Visit a parse tree produced by block().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitBlock(karelParser.BlockContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.BlockContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitCondition(karelParser.ConditionContext)
Visit a parse tree produced by condition().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitCondition(karelParser.ConditionContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.ConditionContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitConditional(karelParser.ConditionalContext)
Visit a parse tree produced by conditional().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitConditional(karelParser.ConditionalContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.ConditionalContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitDefinition(karelParser.DefinitionContext)
Visit a parse tree produced by definition().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitDefinition(karelParser.DefinitionContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.DefinitionContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitInstruction(karelParser.InstructionContext)
Visit a parse tree produced by instruction().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitInstruction(karelParser.InstructionContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.InstructionContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitIteration(karelParser.IterationContext)
Visit a parse tree produced by iteration().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitIteration(karelParser.IterationContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.IterationContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitKarel(karelParser.KarelContext)
Visit a parse tree produced by karel().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitKarel(karelParser.KarelContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.KarelContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitLoop(karelParser.LoopContext)
Visit a parse tree produced by loop().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitLoop(karelParser.LoopContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.LoopContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitNumber(karelParser.NumberContext)
Visit a parse tree produced by number().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitNumber(karelParser.NumberContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.NumberContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |
VisitStatement(karelParser.StatementContext)
Visit a parse tree produced by statement().
The default implementation returns the result of calling context
.
Declaration
public virtual Result VisitStatement(karelParser.StatementContext context)
Parameters
Type | Name | Description |
---|---|---|
karelParser.StatementContext | context | The parse tree. |
Returns
Type | Description |
---|---|
Result |