Documentation
¶
Overview ¶
Package antlrz contains utilities for working with ANTLR4.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenExtractor ¶
type TokenExtractor struct {
// contains filtered or unexported fields
}
TokenExtractor extracts the raw text of a parser rule from the input.
func NewTokenExtractor ¶
func NewTokenExtractor(input string) *TokenExtractor
NewTokenExtractor returns a new TokenExtractor.
func (*TokenExtractor) Extract ¶
func (l *TokenExtractor) Extract(prc antlr.ParserRuleContext) string
Extract extracts the raw text of the parser rule from the input. It may panic if the parser rule is not found in the input.
func (*TokenExtractor) Offset ¶
func (l *TokenExtractor) Offset(prc antlr.ParserRuleContext) (start, stop int)
Offset returns the start and stop (inclusive) offsets of the parser rule in the input.
Click to show internal directories.
Click to hide internal directories.