diff options
Diffstat (limited to 'c_compiler/src/c_parser.y')
-rw-r--r-- | c_compiler/src/c_parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c_compiler/src/c_parser.y b/c_compiler/src/c_parser.y index b3430ee..c762151 100644 --- a/c_compiler/src/c_parser.y +++ b/c_compiler/src/c_parser.y @@ -202,7 +202,7 @@ SelectionStatement: ExpressionStatement: T_SC { $$ = new ExpressionStatement(); } -| Expression T_SC { $$ = new ExpressionStatement(); } +| Expression T_SC { $$ = new ExpressionStatement($1); } ; JumpStatement: @@ -223,7 +223,7 @@ Expression: AssignmentExpression: ConditionalExpression { $$ = $1; } - | UnaryExpression ASSIGN_OPER AssignmentExpression { $$ = $1; } +| UnaryExpression ASSIGN_OPER AssignmentExpression { $$ = new AssignmentExpression($1, $3); } ; ASSIGN_OPER: |