aboutsummaryrefslogtreecommitdiffstats
path: root/ast_expr2.y
diff options
context:
space:
mode:
Diffstat (limited to 'ast_expr2.y')
-rwxr-xr-xast_expr2.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/ast_expr2.y b/ast_expr2.y
index b25917cc4..9aab0f164 100755
--- a/ast_expr2.y
+++ b/ast_expr2.y
@@ -159,7 +159,10 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
start: expr { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
((struct parse_io *)parseio)->val->type = $$->type;
- ((struct parse_io *)parseio)->val->u.s = $$->u.s; }
+ if( $$->type == AST_EXPR_integer )
+ ((struct parse_io *)parseio)->val->u.i = $$->u.i;
+ else
+ ((struct parse_io *)parseio)->val->u.s = $$->u.s; }
;
expr: TOKEN { $$= $1;}