public Token(PageLine line, int index, RawToken token) { Page = line.Page; Line = line; Index = index; ColumnStart = token.ColumnStart; ColumnEnd = token.ColumnEnd; Type = token.Type; Hints = TokenHints.None; Content = token.Content; }
public Token FindPreviousToken() { if (Index - 1 > 0) { return(Line[Index - 1]); } PageLine line = Line.GetPreviousLine(); while (line != null) { if (line.TokenCount > 0) { return(line[line.TokenCount - 1]); } else { line = line.GetPreviousLine(); } } return(null); }
public Token FindNextToken() { if (Index + 1 < Line.TokenCount) { return(Line[Index + 1]); } PageLine line = Line.GetNextLine(); while (line != null) { if (line.TokenCount > 0) { return(line[0]); } else { line = line.GetNextLine(); } } return(null); }