Skip to content

Token<TKind> Constructors ​

Initialises a new instance of the Token<TKind> struct. No validation is performed for performance; use CreateToken<TKind>(TKind, SourceMark) to create tokens with guaranteed consistent values.

c#
public Token(TKind kind, TextFile file, int startIndex, int length, int startLineIndex, int startColumnIndex);

View source

Parameters ​

NameTypeDescription
kindTKindThe kind of the token.
fileTextFileThe TextFile the token comes from.
startIndexInt32The index of the start of the token in file.
lengthInt32The length of the token.
startLineIndexInt32Zero based index of the start line of the token in file.
startColumnIndexInt32Zero based index of the start column of the token in file.