klyn.code.klyn.KlynTokenizer.classifyIdentifier
method
public override classifyIdentifier(
token as String,
line as String,
endIndex as Long,
previousWord as String,
inQueryBlock as Boolean
) as TokenKind
Description

Classifies an identifier in Klyn source code, adding recognition for Klyn method declarations (public compute(x as Int)) even when def is omitted.

Parameters
ParameterDescription
tokenIdentifier text.
lineFull source line.
endIndexExclusive end index of token in line.
previousWordPreceding word on the line.
inQueryBlocktrue inside a query: KQL block.
Returns

Resolved TokenKind.

Example
import klyn.code
import klyn.code.klyn

t = KlynTokenizer()
assert t.classifyIdentifier("compute", "public compute(x as Int):", 14, "public", false) == TokenKind.DECLARATION_NAME