]> git.saurik.com Git - cycript.git/commitdiff
Remove AssignmentExpression_: merge to parent.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Jun 2012 21:11:30 +0000 (14:11 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Jun 2012 21:30:04 +0000 (14:30 -0700)
Cycript.yy.in

index 01a1e7ffa22df9753f67983f32c3972a049960c2..d5e3e6a215e1be8dec4235cd8def31c4f6364036 100644 (file)
@@ -327,7 +327,6 @@ int cylex(YYSTYPE *, cy::location *, void *);
 %type <argument_> ArgumentListOpt
 %type <argument_> Arguments
 %type <literal_> ArrayLiteral
-%type <assignment_> AssignmentExpression_
 %type <expression_> AssignmentExpression
 %type <identifier_> BindingIdentifier
 %type <expression_> BitwiseANDExpression
@@ -916,24 +915,20 @@ ConditionalExpression
     ;
 /* }}} */
 /* 11.13 Assignment Operators {{{ */
-AssignmentExpression_
-    : "=" AssignmentExpression { $$ = CYNew CYAssign(NULL, $2); }
-    | "*=" AssignmentExpression { $$ = CYNew CYMultiplyAssign(NULL, $2); }
-    | "/=" AssignmentExpression { $$ = CYNew CYDivideAssign(NULL, $2); }
-    | "%=" AssignmentExpression { $$ = CYNew CYModulusAssign(NULL, $2); }
-    | "+=" AssignmentExpression { $$ = CYNew CYAddAssign(NULL, $2); }
-    | "-=" AssignmentExpression { $$ = CYNew CYSubtractAssign(NULL, $2); }
-    | "<<=" AssignmentExpression { $$ = CYNew CYShiftLeftAssign(NULL, $2); }
-    | ">>=" AssignmentExpression { $$ = CYNew CYShiftRightSignedAssign(NULL, $2); }
-    | ">>>=" AssignmentExpression { $$ = CYNew CYShiftRightUnsignedAssign(NULL, $2); }
-    | "&=" AssignmentExpression { $$ = CYNew CYBitwiseAndAssign(NULL, $2); }
-    | "^=" AssignmentExpression { $$ = CYNew CYBitwiseXOrAssign(NULL, $2); }
-    | "|=" AssignmentExpression { $$ = CYNew CYBitwiseOrAssign(NULL, $2); }
-    ;
-
 AssignmentExpression
     : ConditionalExpression { $$ = $1; }
-    | LeftHandSideExpression AssignmentExpression_ { $2->SetLeft($1); $$ = $2; }
+    | LeftHandSideExpression "=" AssignmentExpression { $$ = CYNew CYAssign($1, $3); }
+    | LeftHandSideExpression "*=" AssignmentExpression { $$ = CYNew CYMultiplyAssign($1, $3); }
+    | LeftHandSideExpression "/=" AssignmentExpression { $$ = CYNew CYDivideAssign($1, $3); }
+    | LeftHandSideExpression "%=" AssignmentExpression { $$ = CYNew CYModulusAssign($1, $3); }
+    | LeftHandSideExpression "+=" AssignmentExpression { $$ = CYNew CYAddAssign($1, $3); }
+    | LeftHandSideExpression "-=" AssignmentExpression { $$ = CYNew CYSubtractAssign($1, $3); }
+    | LeftHandSideExpression "<<=" AssignmentExpression { $$ = CYNew CYShiftLeftAssign($1, $3); }
+    | LeftHandSideExpression ">>=" AssignmentExpression { $$ = CYNew CYShiftRightSignedAssign($1, $3); }
+    | LeftHandSideExpression ">>>=" AssignmentExpression { $$ = CYNew CYShiftRightUnsignedAssign($1, $3); }
+    | LeftHandSideExpression "&=" AssignmentExpression { $$ = CYNew CYBitwiseAndAssign($1, $3); }
+    | LeftHandSideExpression "^=" AssignmentExpression { $$ = CYNew CYBitwiseXOrAssign($1, $3); }
+    | LeftHandSideExpression "|=" AssignmentExpression { $$ = CYNew CYBitwiseOrAssign($1, $3); }
     ;
 /* }}} */
 /* 11.14 Comma Operator {{{ */