From 11627049aec88e21b6a9cbdef10984868d4ca3fe Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 9 Jun 2008 20:45:19 -0700 Subject: Make strings a first-class token type; defer evaluation Make strings a proper, first-class token type, instead of relying on the "TOKEN_NUM with tv_charptr" hack. Only convert a string to a number if requested in an expression context; this also makes it possible to actually issue a warning when it overflows. --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index c188095..6fb7e3c 100644 --- a/parser.c +++ b/parser.c @@ -356,7 +356,7 @@ restart_parse: eop->type = EOT_NOTHING; oper_num++; - if (i == TOKEN_NUM && tokval.t_charptr && is_comma_next()) { + if (i == TOKEN_STR && is_comma_next()) { eop->type = EOT_DB_STRING; eop->stringval = tokval.t_charptr; eop->stringlen = tokval.t_inttwo; -- cgit v1.2.3