public override classifyIdentifier( token as String, line as String, endIndex as Long, previousWord as String, inQueryBlock as Boolean ) as TokenKind
Classifies an identifier in Klyn source code, adding recognition for Klyn method declarations (public compute(x as Int)) even when def is omitted.
| Parameter | Description |
|---|---|
token | Identifier text. |
line | Full source line. |
endIndex | Exclusive end index of token in line. |
previousWord | Preceding word on the line. |
inQueryBlock | true inside a query: KQL block. |
Resolved TokenKind.
import klyn.code
import klyn.code.klyn
t = KlynTokenizer()
assert t.classifyIdentifier("compute", "public compute(x as Int):", 14, "public", false) == TokenKind.DECLARATION_NAME