summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-09 20:45:19 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-09 20:45:19 -0700
commit11627049aec88e21b6a9cbdef10984868d4ca3fe (patch)
tree1d6a223214cc0425ea11d3e2314b68d4030c2db6 /parser.c
parentfcb8909749b2a159ba7f32fec7df8e465a974f77 (diff)
downloadnasm-11627049aec88e21b6a9cbdef10984868d4ca3fe.tar.gz
nasm-11627049aec88e21b6a9cbdef10984868d4ca3fe.tar.bz2
nasm-11627049aec88e21b6a9cbdef10984868d4ca3fe.zip
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.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c2
1 files changed, 1 insertions, 1 deletions
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;