Add token references in structure_element_declaration_c
authorMario de Sousa <msousa@fe.up.pt>
Tue, 04 Apr 2017 15:24:28 +0100
changeset 1044 519a30dbf96c
parent 1043 4165b7189c32
child 1045 428e0748b5cd
Add token references in structure_element_declaration_c
stage1_2/iec_bison.yy
--- a/stage1_2/iec_bison.yy	Tue Apr 04 15:21:42 2017 +0100
+++ b/stage1_2/iec_bison.yy	Tue Apr 04 15:24:28 2017 +0100
@@ -3213,15 +3213,15 @@
 
 structure_element_declaration:
   structure_element_name ':' simple_spec_init
-	{$$ = new structure_element_declaration_c($1, $3, locloc(@$));}
+	{$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;}
 | structure_element_name ':' subrange_spec_init
-	{$$ = new structure_element_declaration_c($1, $3, locloc(@$));}
+	{$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;}
 | structure_element_name ':' enumerated_spec_init
-	{$$ = new structure_element_declaration_c($1, $3, locloc(@$));}
+	{$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;}
 | structure_element_name ':' array_spec_init
-	{$$ = new structure_element_declaration_c($1, $3, locloc(@$));}
+	{$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;}
 | structure_element_name ':' initialized_structure
-	{$$ = new structure_element_declaration_c($1, $3, locloc(@$));}
+	{$$ = new structure_element_declaration_c($1, $3, locloc(@$)); $$->token = $1->token;}
 | structure_element_name ':' ref_spec_init                              /* non standard extension: Allow use of struct elements storing REF_TO datatypes (either using REF_TO or a previosuly declared ref type) */
 	{ $$ = new structure_element_declaration_c($1, $3, locloc(@$));
 	  if (!allow_ref_to_in_derived_datatypes) {