little typo in last commited code
authorAndreas Graeper <agraeper@googemail.com>
Tue, 05 Jun 2012 11:10:12 +0200
changeset 563 61410284a9b4
parent 562 044238931066
child 564 dabffc3086dc
little typo in last commited code
add if(is_bool_type(sym)) this->bool_type->accept(*this) in generate_c_il_c::visit(il_default_variable_c*)
to get .BOOLvar instead of .FALSEvar resp. .TRUEvar ..
stage4/generate_c/generate_c_il.cc
--- a/stage4/generate_c/generate_c_il.cc	Mon Jun 04 18:22:11 2012 +0100
+++ b/stage4/generate_c/generate_c_il.cc	Tue Jun 05 11:10:12 2012 +0200
@@ -524,19 +524,15 @@
 
 public:
 void *visit(il_default_variable_c *symbol) {
-  //s4o.print("il_default_variable_c VISITOR!!\n");
   symbol->var_name->accept(*this);
   if (NULL != symbol->current_type) {
     s4o.print(".");
-    if (search_expression_type->is_literal_integer_type(symbol->current_type))
-      this->lint_type.accept(*this);
-    else if (search_expression_type->is_literal_real_type(this->default_variable_name.current_type))
-      this->lreal_type.accept(*this);
-    else
-      symbol->current_type->accept(*this);
+    if      ( search_expression_type->is_literal_integer_type(symbol->current_type))                  this->lint_type.accept(*this);
+    else if ( search_expression_type->is_literal_real_type(this->default_variable_name.current_type)) this->lreal_type.accept(*this);
+    else if ( search_expression_type->is_bool_type(this->default_variable_name.current_type))         this->bool_type.accept(*this); 
+    else symbol->current_type->accept(*this);
     s4o.print("var");
-  }
-  return NULL;
+  } return NULL;
 }