Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAnyParent ¶
FindAnyParent returns the closest parent RuleContext matching any of the given types.
func FindChild ¶
FindChild performs a depth-first search traversal and returns the first child of a certain type.
func FindParent ¶
FindParent returns the closest parent RuleContext matching a certain type. If the Tree is of type t, it is returned directly.
func HasErrorNode ¶
HasErrorNode checks whether the given ParseTree contains an ErrorNode.
Types ¶
type Pos ¶
type Pos interface { // GetStart returns the position where the Token begins. GetStart() int // GetStop returns the position where the Token ends. GetStop() int }
Pos provides the position of Tokens in a ParseTree.
func GetPosition ¶
GetPosition returns the position of the given Token or Symbol.
Click to show internal directories.
Click to hide internal directories.