public isValidIdentifier(text as String) as Boolean
Checks whether text is a syntactically valid identifier according to this tokenizer's profile.
| Parameter | Description |
|---|---|
text | Candidate identifier string. |
true when text is non-empty and consists of valid identifier start and part characters.
import klyn.code.klyn
t = KlynTokenizer()
assert t.isValidIdentifier("myVar_1")
assert not t.isValidIdentifier("123bad")