aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/lexer.l')
-rw-r--r--src/libexpr/lexer.l5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index 705b31b41..3b6e0bb65 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -58,7 +58,10 @@ rec { return REC; }
\-\> { return IMPL; }
{ID} { yylval->t = ATmake("<str>", yytext); return ID; /* !!! alloc */ }
-{INT} { return INT; }
+{INT} { int n = atoi(yytext); /* !!! overflow */
+ yylval->t = ATmake("<int>", n);
+ return INT;
+ }
{STR} { int len = strlen(yytext);
yytext[len - 1] = 0;
yylval->t = ATmake("<str>", yytext + 1);