klyn.code.CodeTokenizer.isValidIdentifier
method
public isValidIdentifier(text as String) as Boolean
Description

Checks whether text is a syntactically valid identifier according to this tokenizer's profile.

Parameters
ParameterDescription
textCandidate identifier string.
Returns

true when text is non-empty and consists of valid identifier start and part characters.

Example
import klyn.code.klyn

t = KlynTokenizer()
assert t.isValidIdentifier("myVar_1")
assert not t.isValidIdentifier("123bad")