stage4/generate_cc/generate_cc_il.cc
changeset 17 38754701ac41
parent 16 e8b99f896416
child 32 289256ec66f1
--- a/stage4/generate_cc/generate_cc_il.cc	Tue Feb 20 18:17:21 2007 +0100
+++ b/stage4/generate_cc/generate_cc_il.cc	Fri Feb 23 19:19:23 2007 +0100
@@ -319,6 +319,21 @@
       il->accept(*this);
     }
 
+    /* Declare the backup to the default variable, that will store the result
+     * of the IL operations executed inside a parenthesis...
+     */
+    void declare_backup_variable(void) {
+      s4o.print(s4o.indent_spaces);
+      s4o.print(IL_DEFVAR_T);
+      s4o.print(" ");
+      print_backup_variable();
+      s4o.print(";\n");
+    }
+    
+    void print_backup_variable(void) {
+      this->default_variable_back_name.accept(*this);
+    }
+
   private:
     /* A helper function... */
     /*
@@ -458,15 +473,12 @@
 
 /*| instruction_list il_instruction */
 void *visit(instruction_list_c *symbol) {
+  
   /* Declare the backup to the default variable, that will store the result
    * of the IL operations executed inside a parenthesis...
    */
-  s4o.print(s4o.indent_spaces);
-  s4o.print(IL_DEFVAR_T);
-  s4o.print(" ");
-  this->default_variable_back_name.accept(*this);
-  s4o.print(";\n");
-
+  declare_backup_variable();
+  
   /* Declare the default variable, that will store the result of the IL operations... */
   s4o.print(s4o.indent_spaces);
   s4o.print(IL_DEFVAR_T);