aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/src/c_parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/src/c_parser.y')
-rw-r--r--c_compiler/src/c_parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/c_compiler/src/c_parser.y b/c_compiler/src/c_parser.y
index feb5d0b..a7f05e0 100644
--- a/c_compiler/src/c_parser.y
+++ b/c_compiler/src/c_parser.y
@@ -250,8 +250,8 @@ IdentifierList: T_IDENTIFIER { $$ = new IdentifierDeclaration(); }
| IdentifierList T_CMA T_IDENTIFIER { $$ = new IdentifierDeclaration(); }
Initializer: AssignmentExpression { $$ = $1; }
- | T_LCB InitializerList T_RCB { $$ = $2; }
- | T_LCB InitializerList T_CMA T_RCB { $$ = $2; }
+ | T_LCB InitializerList T_RCB { $$ = new Initializer($2); }
+ | T_LCB InitializerList T_CMA T_RCB { $$ = new Initializer($2); }
;
InitializerList: