public override classifyIdentifier( token as String, line as String, endIndex as Long, previousWord as String, inQueryBlock as Boolean ) as TokenKind
Classifies Rust identifiers, recognizing macro invocations (ident!), type / mod declarations, associated types, and :: path segments.
| Parameter | Description |
|---|---|
token | Identifier text. |
line | Full source line. |
endIndex | Exclusive end index of token in line. |
previousWord | Immediately preceding word on the line. |
inQueryBlock | Unused in Rust (false). |
Resolved TokenKind.
import klyn.code
import klyn.code.rust
t = RustTokenizer()
assert t.classifyIdentifier("println", "println!(\"hi\");", 7, "", false) == TokenKind.BUILTIN