forked from jasder/antlr
Fixes #1238. @antlr/antlr-targets might want to tweak their targets.
This commit is contained in:
parent
3506dcef1d
commit
c695ed25e9
|
@ -456,18 +456,17 @@ public class BufferedTokenStream implements TokenStream {
|
|||
|
||||
@Override
|
||||
public String getText() {
|
||||
lazyInit();
|
||||
fill();
|
||||
return getText(Interval.of(0,size()-1));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getText(Interval interval) {
|
||||
@Override
|
||||
public String getText(Interval interval) {
|
||||
lazyInit();
|
||||
fill();
|
||||
int start = interval.a;
|
||||
int stop = interval.b;
|
||||
if ( start<0 || stop<0 ) return "";
|
||||
lazyInit();
|
||||
if ( start<0 || stop<0 ) return "";
|
||||
lazyInit();
|
||||
if ( stop>=tokens.size() ) stop = tokens.size()-1;
|
||||
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
|
Loading…
Reference in New Issue