CommonToken constructor
CommonToken(
- int type, {
- Pair<
TokenSource?, CharStream?> source = EMPTY_SOURCE, - int channel = Token.DEFAULT_CHANNEL,
- int startIndex = -1,
- int stopIndex = -1,
- dynamic text,
Constructs a new CommonToken with the specified token type and text.
@param type The token type. @param text The text of the token.
Implementation
CommonToken(
this.type, {
this.source = EMPTY_SOURCE,
this.channel = Token.DEFAULT_CHANNEL,
this.startIndex = -1,
this.stopIndex = -1,
text,
}) {
_text = text;
if (source.a != null) {
line = source.a!.line;
charPositionInLine = source.a!.charPositionInLine;
}
}