From e7797a6685fafa3186ca3f273e721614e419a4e5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 6 Jun 2012 16:04:21 -0700 Subject: [PATCH] Make Expression always return a compact CYCompound. --- Cycript.yy.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cycript.yy.in b/Cycript.yy.in index 02d2f01..dfabafb 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -362,7 +362,7 @@ int cylex(YYSTYPE *, cy::location *, void *); %type EmptyStatement %type EqualityExpression %type Expression_ -%type Expression +%type Expression %type ExpressionOpt %type ExpressionStatement %type FinallyOpt @@ -928,12 +928,12 @@ AssignmentExpression /* }}} */ /* 11.14 Comma Operator {{{ */ Expression_ - : "," Expression { $$ = CYNew CYCompound($2); } - | { $$ = NULL; } + : "," Expression { $$ = $2; } + | { $$ = CYNew CYCompound(); } ; Expression - : AssignmentExpression Expression_ { if ($2) { $2->AddPrev($1); $$ = $2; } else $$ = $1; } + : AssignmentExpression Expression_ { $2->AddPrev($1); $$ = $2; } ; ExpressionOpt -- 2.47.2