Top Description Methods
org.antlr.v4.runtime.tree

public Interface ParseTreeVisitor<Result>

Known Direct Implementers
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
Type Parameters
<Result>
The return type of the visit operation. Use Void for operations with no return type.
Imports
org.antlr.v4.runtime.misc.NotNull

This interface defines the basic notion of a parse tree visitor. Generated visitors implement this interface and the XVisitor interface for grammar X.
Author
Sam Harwell

Method Summary

Modifier and TypeMethod and Description
public Result

Returns:

The result of visiting the parse tree.
visit
(ParseTree
The ParseTree to visit.
tree
)

Visit a parse tree, and return a user-defined result of the operation.

public Result

Returns:

The result of visiting the children of the node.
visitChildren
(RuleNode
The RuleNode whose children should be visited.
node
)

Visit the children of a node, and return a user-defined result of the operation.

public Result

Returns:

The result of visiting the node.
visitErrorNode
(ErrorNode
The ErrorNode to visit.
node
)

Visit an error node, and return a user-defined result of the operation.

public Result

Returns:

The result of visiting the node.
visitTerminal
(TerminalNode
The TerminalNode to visit.
node
)

Visit a terminal node, and return a user-defined result of the operation.

Method Detail

visitback to summary
public Result visit(ParseTree tree)

Visit a parse tree, and return a user-defined result of the operation.

Parameters
tree:ParseTree

The ParseTree to visit.

Returns:Result

The result of visiting the parse tree.

visitChildrenback to summary
public Result visitChildren(RuleNode node)

Visit the children of a node, and return a user-defined result of the operation.

Parameters
node:RuleNode

The RuleNode whose children should be visited.

Returns:Result

The result of visiting the children of the node.

visitErrorNodeback to summary
public Result visitErrorNode(ErrorNode node)

Visit an error node, and return a user-defined result of the operation.

Parameters
node:ErrorNode

The ErrorNode to visit.

Returns:Result

The result of visiting the node.

visitTerminalback to summary
public Result visitTerminal(TerminalNode node)

Visit a terminal node, and return a user-defined result of the operation.

Parameters
node:TerminalNode

The TerminalNode to visit.

Returns:Result

The result of visiting the node.