From 6430127cc4503e2e7e40f86ccc68594ced055274 Mon Sep 17 00:00:00 2001 From: glenda Date: Sun, 18 Sep 2022 12:02:10 +0000 Subject: File IO (very simple) --- lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexer.c') 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); } -- cgit v1.2.3