diff options
author | ymherklotz <ymherklotz@gmail.com> | 2017-03-10 17:38:14 +0000 |
---|---|---|
committer | ymherklotz <ymherklotz@gmail.com> | 2017-03-10 17:38:14 +0000 |
commit | 7a61349a09b4db96794a2a90d2d488f020885442 (patch) | |
tree | 22194f4eeb49b3111531dc352df14264c3cfb973 /c_compiler/src/c_parser.y | |
parent | b9ab15bb2188543b8883ee8cf86540ed2684ed9d (diff) | |
download | Compiler-7a61349a09b4db96794a2a90d2d488f020885442.tar.gz Compiler-7a61349a09b4db96794a2a90d2d488f020885442.zip |
Finished assignment expression
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: |