forked from jasder/antlr
Added GetTokenSourceCharStreamPair method to lexer. Needed when customising lexer eg. to create a python style block sensitive lexer.
This commit is contained in:
parent
763669ffc7
commit
2b69dd7c18
|
@ -282,6 +282,10 @@ func (b *BaseLexer) setInputStream(input CharStream) {
|
|||
b.tokenFactorySourcePair = &TokenSourceCharStreamPair{b, b.input}
|
||||
}
|
||||
|
||||
func (b *BaseLexer) GetTokenSourceCharStreamPair() *TokenSourceCharStreamPair {
|
||||
return b.tokenFactorySourcePair
|
||||
}
|
||||
|
||||
// By default does not support multiple emits per NextToken invocation
|
||||
// for efficiency reasons. Subclass and override l method, NextToken,
|
||||
// and GetToken (to push tokens into a list and pull from that list
|
||||
|
|
Loading…
Reference in New Issue