fully allow upper-case letters in variable names

This commit is contained in:
Lewis Van Winkle
2021-03-03 16:20:38 -06:00
parent 8d7ebbba53
commit 61af1dd24c
3 changed files with 8 additions and 8 deletions

View File

@@ -243,7 +243,7 @@ void next_token(state *s) {
s->type = TOK_NUMBER;
} else {
/* Look for a variable or builtin function call. */
if (s->next[0] >= 'a' && s->next[0] <= 'z') {
if (isalpha(s->next[0])) {
const char *start;
start = s->next;
while (isalpha(s->next[0]) || isdigit(s->next[0]) || (s->next[0] == '_')) s->next++;