@Override public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) { CommonToken t = new CommonToken(source, type, channel, start, stop); t.setLine(line); t.setCharPositionInLine(charPositionInLine); if ( text!=null ) { t.setText(text); } else if ( copyText && source.b != null ) { t.setText(source.b.getText(Interval.of(start,stop))); } return t; }
@Override public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) { CommonToken t = new CommonToken(source, type, channel, start, stop); t.setLine(line); t.setCharPositionInLine(charPositionInLine); if ( text!=null ) { t.setText(text); } else if ( copyText && source.b != null ) { t.setText(source.b.getText(Interval.of(start,stop))); } return t; }
@Override public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) { CommonToken t = new CommonToken(source, type, channel, start, stop); t.setLine(line); t.setCharPositionInLine(charPositionInLine); if ( text!=null ) { t.setText(text); } else if ( copyText && source.b != null ) { t.setText(source.b.getText(Interval.of(start,stop))); } return t; }
@Override public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) { CommonToken t = new CommonToken(source, type, channel, start, stop); t.setLine(line); t.setCharPositionInLine(charPositionInLine); if ( text!=null ) { t.setText(text); } else if ( copyText && source.b != null ) { t.setText(source.b.getText(Interval.of(start,stop))); } return t; }
@Override public CommonToken create(Tuple2<? extends TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) { CommonToken t = new CommonToken(source, type, channel, start, stop); t.setLine(line); t.setCharPositionInLine(charPositionInLine); if ( text!=null ) { t.setText(text); } else if ( copyText && source.getItem2() != null ) { t.setText(source.getItem2().getText(Interval.of(start,stop))); } return t; }