Beispiel #1
0
// Return whether the identifier t is reserved
func (tok *JSTokenizer) isReserved(t string) bool {
	return tokenize.BSearchStrings(tok.reserved, strings.TrimSpace(t)) != -1
}
Beispiel #2
0
// Return whether t is a javascript reserved word
func (tok *JSTokenizer) isKw(t string) bool {
	return tokenize.BSearchStrings(tok.keywords, strings.TrimSpace(t)) != -1
}