stage3/fill_candidate_datatypes.hh
changeset 465 b52ec62773db
parent 464 319ee8b218f3
child 472 d26759a2274a
--- a/stage3/fill_candidate_datatypes.hh	Sat Mar 03 20:42:48 2012 +0000
+++ b/stage3/fill_candidate_datatypes.hh	Thu Mar 08 18:57:14 2012 +0000
@@ -60,7 +60,7 @@
      * fill_candidate_datatypes_c::visit(case_statement_c *symbol) function to
      * fill_candidate_datatypes_c::visit(case_list_c *symbol) function.
      */
-    symbol_c *case_expression_type;
+//     symbol_c *case_expression_type;
 
     /* In IL code, once we find a type mismatch error, it is best to
      * ignore any further errors until the end of the logical operation,
@@ -71,8 +71,8 @@
      * We therefore need a counter to know how deep inside a parenthesis
      * structure we are.
      */
-    int  il_parenthesis_level;
-    bool error_found;
+//     int  il_parenthesis_level;
+//     bool error_found;
 
     /* the current data type of the data stored in the IL stack, i.e. the default variable */
     symbol_c *prev_il_instruction;
@@ -91,6 +91,10 @@
     /* a helper function... */
     symbol_c *base_type(symbol_c *symbol);    
     
+    /* add a data type to a candidate data type list, while guaranteeing no duplicate entries! */
+    /* Returns true if it really did add the datatype to the list, or false if it was already present in the list! */
+    bool add_datatype_to_candidate_list(symbol_c *symbol, symbol_c *datatype);
+    
     
   public:
     fill_candidate_datatypes_c(symbol_c *ignore);