public isKeyword(word as String) as Boolean
Checks in $O(1)$ whether word is a registered keyword of this language.
| Parameter | Description |
|---|---|
word | Token text to test. |
true if word is a keyword.
import klyn.code
p = LanguageProfile("klyn", "Klyn").withKeywords(["def", "return"])
assert p.isKeyword("def")
assert not p.isKeyword("other")