Added support for underscore in variable names.

This commit is contained in:
Lewis Van Winkle
2016-11-28 18:20:10 -06:00
parent f0b59d6d48
commit 5bb556038d
2 changed files with 3 additions and 3 deletions

View File

@@ -207,7 +207,7 @@ void next_token(state *s) {
if (s->next[0] >= 'a' && s->next[0] <= 'z') {
const char *start;
start = s->next;
while ((s->next[0] >= 'a' && s->next[0] <= 'z') || (s->next[0] >= '0' && s->next[0] <= '9')) s->next++;
while ((s->next[0] >= 'a' && s->next[0] <= 'z') || (s->next[0] >= '0' && s->next[0] <= '9') || (s->next[0] == '_')) s->next++;
const te_variable *var = find_lookup(s, start, s->next - start);
if (!var) var = find_builtin(start, s->next - start);