public virtual IToken newTokenFromPreviousChar(int ttype) { STToken t = new STToken(input, ttype, input.Index - 1, input.Index - 1); t.Line = input.Line; t.CharPositionInLine = input.CharPositionInLine - 1; return(t); }
public virtual IToken newToken(int ttype) { STToken t = new STToken(input, ttype, startCharIndex, input.Index - 1); t.Line = startLine; t.CharPositionInLine = startCharPositionInLine; return(t); }
public virtual IToken newToken(int ttype, string text) { STToken t = new STToken(ttype, text); t.StartIndex = startCharIndex; t.StopIndex = input.Index - 1; t.Line = startLine; t.CharPositionInLine = startCharPositionInLine; return(t); }