public CommonToken(Pair<TokenSource, CharStream> source, int type, int channel, int start, int stop) {this.source = source;this.type = type;this.channel = channel;this.start = start;this.stop = stop;if (source.a != null) {this.line = source.a.getLine();this.charPositionInLine = source.a.getCharPositionInLine();}}
public CommonToken(Tuple<ITokenSource, ICharStream> source, int type, int channel, int start, int stop){this.source = source;this._type = type;this._channel = channel;this.start = start;this.stop = stop;if (source.Item1 != null){this._line = source.Item1.Line;this.charPositionInLine = source.Item1.Column;}}