Fixed generation of VARIABLES.csv, some variables appeared in program section
authoretisserant
Mon, 04 Aug 2008 15:14:25 +0200
changeset 135 0f3f6714b938
parent 134 0e43c556cd2d
child 136 32bd7ef40897
Fixed generation of VARIABLES.csv, some variables appeared in program section
stage4/generate_c/generate_var_list.cc
--- a/stage4/generate_c/generate_var_list.cc	Wed Jul 23 11:44:39 2008 +0200
+++ b/stage4/generate_c/generate_var_list.cc	Mon Aug 04 15:14:25 2008 +0200
@@ -580,6 +580,16 @@
       current_name->symbol = symbol->configuration_name;
       current_symbol_list.push_back(*current_name);
       configuration_defined = true;
+      
+      switch (current_declarationtype) {
+        case variables_dt:
+          if (symbol->global_var_declarations != NULL)
+            symbol->global_var_declarations->accept(*this);
+          break;
+        default:
+          break;
+      }
+
       symbol->resource_declarations->accept(*this);
       current_symbol_list.pop_back();
       configuration_defined = false;
@@ -597,9 +607,16 @@
       current_name = new SYMBOL;
       current_name->symbol = symbol->resource_name;
       current_symbol_list.push_back(*current_name);
-      
-      if (symbol->global_var_declarations != NULL)
-        symbol->global_var_declarations->accept(*this);
+
+      switch (current_declarationtype) {
+        case variables_dt:
+          if (symbol->global_var_declarations != NULL)
+            symbol->global_var_declarations->accept(*this);
+          break;
+        default:
+          break;
+      }
+      
       
       symbol->resource_declaration->accept(*this);