diff options
author | glenda <glenda@cirno> | 2022-09-18 12:02:10 +0000 |
---|---|---|
committer | glenda <glenda@cirno> | 2022-09-18 12:02:10 +0000 |
commit | 6430127cc4503e2e7e40f86ccc68594ced055274 (patch) | |
tree | c59362f84ac28e051a31ea48495e6d002e019e20 /lexer.c | |
parent | 0719e6cf67a4644282f97431024f6a350b45ff46 (diff) |
File IO (very simple)
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |