511 finterface_var_count++; |
513 finterface_var_count++; |
512 s4o.print(nv->get()); |
514 s4o.print(nv->get()); |
513 s4o.print("\n" + s4o.indent_spaces); |
515 s4o.print("\n" + s4o.indent_spaces); |
514 this->current_var_type_symbol->accept(*this); |
516 this->current_var_type_symbol->accept(*this); |
515 if ((current_vartype & (output_vt | inoutput_vt)) != 0) |
517 if ((current_vartype & (output_vt | inoutput_vt)) != 0) |
516 s4o.print(" &"); |
518 s4o.print(" *__"); |
517 else |
519 else |
518 s4o.print(" "); |
520 s4o.print(" "); |
519 list->elements[i]->accept(*this); |
521 list->elements[i]->accept(*this); |
520 /* We do not print the initial value at function declaration! |
522 /* We do not print the initial value at function declaration! |
521 * It is up to the caller to pass the correct default value |
523 * It is up to the caller to pass the correct default value |
522 * if none is specified in the ST source code |
524 * if none is specified in the ST source code |
523 */ |
525 */ |
524 /* if (this->current_var_init_symbol != NULL) { |
526 /* if (this->current_var_init_symbol != NULL) { |
525 s4o.print(" = "); this->current_var_init_symbol->accept(*this);} |
527 s4o.print(" = "); this->current_var_init_symbol->accept(*this);} |
526 */ |
528 */ |
|
529 } |
|
530 } |
|
531 |
|
532 if (wanted_varformat == foutputdecl_vf) { |
|
533 for(int i = 0; i < list->n; i++) { |
|
534 if ((current_vartype & (output_vt | inoutput_vt)) != 0) { |
|
535 s4o.print(s4o.indent_spaces); |
|
536 this->current_var_type_symbol->accept(*this); |
|
537 s4o.print(" "); |
|
538 list->elements[i]->accept(*this); |
|
539 s4o.print(";\n"); |
|
540 } |
|
541 } |
|
542 } |
|
543 |
|
544 if (wanted_varformat == foutputassign_vf) { |
|
545 for(int i = 0; i < list->n; i++) { |
|
546 if ((current_vartype & (output_vt | inoutput_vt)) != 0) { |
|
547 s4o.print(s4o.indent_spaces + "if (__"); |
|
548 list->elements[i]->accept(*this); |
|
549 s4o.print(" != NULL) {\n"); |
|
550 s4o.indent_right(); |
|
551 s4o.print(s4o.indent_spaces + "*__"); |
|
552 list->elements[i]->accept(*this); |
|
553 s4o.print(" = "); |
|
554 list->elements[i]->accept(*this); |
|
555 s4o.print(";\n"); |
|
556 s4o.indent_left(); |
|
557 s4o.print(s4o.indent_spaces + "}\n"); |
|
558 } |
527 } |
559 } |
528 } |
560 } |
529 |
561 |
530 if (wanted_varformat == constructorinit_vf) { |
562 if (wanted_varformat == constructorinit_vf) { |
531 for(int i = 0; i < list->n; i++) { |
563 for(int i = 0; i < list->n; i++) { |