forked from jasder/antlr
Can get token start and stop index from Token interface now
This commit is contained in:
parent
4ae58868d7
commit
d7dbef2782
|
@ -84,10 +84,8 @@ public class CommonToken implements WritableToken, Serializable {
|
|||
charPositionInLine = oldToken.getCharPositionInLine();
|
||||
channel = oldToken.getChannel();
|
||||
source = oldToken.getTokenSource();
|
||||
if ( oldToken instanceof CommonToken ) {
|
||||
start = ((CommonToken)oldToken).start;
|
||||
stop = ((CommonToken)oldToken).stop;
|
||||
}
|
||||
start = oldToken.getStartIndex();
|
||||
stop = oldToken.getStopIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue