public Token( kind as TokenKind, text as String, line as Long = 0, column as Long = 0, startOffset as Long = 0, endOffset as Long = 0 )
Constructs a materialized Token.
| Parameter | Description |
|---|---|
kind | Lexical classification of the token. |
text | Exact source text of the token. |
line | Zero-based line index. |
column | Zero-based column index within line. |
startOffset | Zero-based inclusive character offset in the document. |
endOffset | Zero-based exclusive character offset in the document. |
import klyn.code tok = Token(TokenKind.IDENTIFIER, "count", 2, 4, 18, 23)