# HG changeset patch # User Mario de Sousa # Date 1491315868 -3600 # Node ID 519a30dbf96cc1b0ffa71766ec1783c57e54d014 # Parent 4165b7189c32bfa6a5d0ef8ebc595a7e111e1251 Add token references in structure_element_declaration_c diff -r 4165b7189c32 -r 519a30dbf96c 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) {