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.

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

View source

Parameters

Name Type Description
kind TKind The kind of the token.
file TextFile The TextFile the token comes from.
startIndex Int32 The index of the start of the token in file.
length Int32 The length of the token.
startLineIndex Int32 Zero based index of the start line of the token in file.
startColumnIndex Int32 Zero based index of the start column of the token in file.