summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 9971ecd..45f5f5f 100644
--- a/lexer.c
+++ b/lexer.c
@@ -194,7 +194,7 @@ get_digits:
*p = 0;
ungetrune(input);
stmt->toks[stmt->ntoks] = allocdatum(ArrayTag, 0);
- stmt->toks[stmt->ntoks]->array = floating ? mkscalarfloat(atof(buf)) : mkscalarint(atoll(buf));
+ stmt->toks[stmt->ntoks]->array = floating ? mkscalarfloat(atof(buf)) : mkscalarint(strtoull(buf, nil, 0));
}else if(runestrchr(L"⍺⍵⍶⍹", peek)){
Rune name[2] = {peek, 0};
stmt->toks[stmt->ntoks] = allocdatum(NameTag, 0);
@@ -216,7 +216,7 @@ get_digits:
Rune *p = buf;
*p++ = peek;
peek = getrune(input);
- while(isalpharune(peek)){
+ while(isalpharune(peek) || isdigitrune(peek)){
*p++ = toupperrune(peek);
peek = getrune(input);
}