klyn.code.Token.Token
constructor
public Token(
kind as TokenKind,
text as String,
line as Long = 0,
column as Long = 0,
startOffset as Long = 0,
endOffset as Long = 0
)
Description

Constructs a materialized Token.

Parameters
ParameterDescription
kindLexical classification of the token.
textExact source text of the token.
lineZero-based line index.
columnZero-based column index within line.
startOffsetZero-based inclusive character offset in the document.
endOffsetZero-based exclusive character offset in the document.
Example
import klyn.code

tok = Token(TokenKind.IDENTIFIER, "count", 2, 4, 18, 23)