forked from jasder/antlr
Adding getTokenSource in BufferedTokenStream
This commit is contained in:
parent
8abc1106f7
commit
0e09f8b659
|
@ -260,6 +260,10 @@ BufferedTokenStream.prototype.setTokenSource = function(tokenSource) {
|
|||
this.index = -1;
|
||||
};
|
||||
|
||||
BufferedTokenStream.prototype.getTokenSource = function() {
|
||||
return this.tokenSource;
|
||||
};
|
||||
|
||||
// Given a starting index, return the index of the next token on channel.
|
||||
// Return i if tokens[i] is on channel. Return -1 if there are no tokens
|
||||
// on channel between i and EOF.
|
||||
|
|
|
@ -217,7 +217,8 @@ class BufferedTokenStream(TokenStream):
|
|||
self.tokens = []
|
||||
self.index = -1
|
||||
|
||||
|
||||
def getTokenSource(self):
|
||||
return self.tokenSource
|
||||
|
||||
# Given a starting index, return the index of the next token on channel.
|
||||
# Return i if tokens[i] is on channel. Return -1 if there are no tokens
|
||||
|
|
|
@ -220,7 +220,8 @@ class BufferedTokenStream(TokenStream):
|
|||
self.tokens = []
|
||||
self.index = -1
|
||||
|
||||
|
||||
def getTokenSource(self):
|
||||
return self.tokenSource
|
||||
|
||||
# Given a starting index, return the index of the next token on channel.
|
||||
# Return i if tokens[i] is on channel. Return -1 if there are no tokens
|
||||
|
|
Loading…
Reference in New Issue