summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-06-01 21:34:58 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-06-01 21:34:58 +0800
commitcd1466f30c146e12faa0db7e1b53b508bf2274c6 (patch)
treed938d02d17bbf4949b0dc1d21dee861afe171bdc /Lexer.l
parentf90115fba35887aea8d4064b57f4909cd6937134 (diff)
64 bit support
Diffstat (limited to 'Lexer.l')
-rw-r--r--Lexer.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lexer.l b/Lexer.l
index caaf43d..be168f3 100644
--- a/Lexer.l
+++ b/Lexer.l
@@ -119,6 +119,7 @@ comment {comment1}|{comment2}|{comment3}
"boolean" {return Parser::make_BOOLEAN(loc);}
"char" {return Parser::make_CHAR(loc);}
"integer" {return Parser::make_INTEGER(loc);}
+"int64" {return Parser::make_INT64(loc);}
"real" {return Parser::make_REAL(loc);}
"string" {return Parser::make_STRING(loc);}
"array" {return Parser::make_ARRAY(loc);}
@@ -129,7 +130,7 @@ comment {comment1}|{comment2}|{comment3}
"false" {return Parser::make_BOOLEAN_LITERAL(false, loc);}
{integer} {
- int number = std::strtol(yytext, NULL, 0);
+ long long number = std::strtoll(yytext, NULL, 0);
return Parser::make_INTEGER_LITERAL(number, loc);
}