645 /*************************************/ |
645 /*************************************/ |
646 |
646 |
647 // SYM_REF2(structured_variable_c, record_variable, field_selector) |
647 // SYM_REF2(structured_variable_c, record_variable, field_selector) |
648 void *visit(structured_variable_c *symbol) { |
648 void *visit(structured_variable_c *symbol) { |
649 TRACE("structured_variable_c"); |
649 TRACE("structured_variable_c"); |
|
650 bool type_is_complex = search_var_instance_decl->type_is_complex(symbol->record_variable); |
650 switch (wanted_variablegeneration) { |
651 switch (wanted_variablegeneration) { |
651 case complextype_base_vg: |
652 case complextype_base_vg: |
652 case complextype_base_assignment_vg: |
653 case complextype_base_assignment_vg: |
653 symbol->record_variable->accept(*this); |
654 symbol->record_variable->accept(*this); |
|
655 if (!type_is_complex) { |
|
656 s4o.print("."); |
|
657 symbol->field_selector->accept(*this); |
|
658 } |
654 break; |
659 break; |
655 case complextype_suffix_vg: |
660 case complextype_suffix_vg: |
656 case assignment_vg: |
661 symbol->record_variable->accept(*this); |
657 symbol->record_variable->accept(*this); |
662 if (type_is_complex) { |
658 s4o.print("."); |
663 s4o.print("."); |
659 symbol->field_selector->accept(*this); |
664 symbol->field_selector->accept(*this); |
660 break; |
665 } |
|
666 break; |
|
667 case assignment_vg: |
|
668 symbol->record_variable->accept(*this); |
|
669 s4o.print("."); |
|
670 symbol->field_selector->accept(*this); |
|
671 break; |
661 default: |
672 default: |
662 if (this->is_variable_prefix_null()) { |
673 if (this->is_variable_prefix_null()) { |
663 symbol->record_variable->accept(*this); |
674 symbol->record_variable->accept(*this); |
664 s4o.print("."); |
675 s4o.print("."); |
665 symbol->field_selector->accept(*this); |
676 symbol->field_selector->accept(*this); |