public override bool Equals(Object obj) { SnapshotToken other = obj as SnapshotToken; if (other == null) { return(false); } return(this.Snapshot.Equals(other.Snapshot) && this.StartIndex == other.StartIndex && this.StopIndex == other.StopIndex && this.Type == other.Type); }
public IToken Create(Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine) { if (effectiveSource != null) { source = effectiveSource; } SnapshotToken t = new SnapshotToken(snapshot, source, type, channel, start, stop); t.Line = line; t.Column = charPositionInLine; if (text != null) { t.Text = text; } return t; }
public IToken Create(Tuple <ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine) { if (effectiveSource != null) { source = effectiveSource; } SnapshotToken t = new SnapshotToken(snapshot, source, type, channel, start, stop); t.Line = line; t.Column = charPositionInLine; if (text != null) { t.Text = text; } return(t); }