public this(IdType type)
Constructs a token from a token type.

Parameters

typethe token type

public this(IdType type, string text, size_t line, size_t column, size_t index)
Constructs a token.

Parameters

typethe token type
textthe text of the token, which may be null
linethe line number at which this token occurs
columnthe column number at which this token occurs
indexthe byte offset from the beginning of the input at which this token occurs