stage3/visit_expression_type.hh
changeset 262 197ba42d78b2
parent 257 90782e241346
child 266 2f6d8866ec8d
equal deleted inserted replaced
261:db2ad6541d92 262:197ba42d78b2
    65      * We therefore need a counter to know how deep inside a parenthesis 
    65      * We therefore need a counter to know how deep inside a parenthesis 
    66      * structure we are.
    66      * structure we are.
    67      */
    67      */
    68     int  il_parenthesis_level;
    68     int  il_parenthesis_level;
    69     bool il_error;
    69     bool il_error;
       
    70     bool error_found;
    70 
    71 
    71     symbol_c *il_default_variable_type;
    72     symbol_c *il_default_variable_type;
    72     symbol_c *il_operand_type;
    73     symbol_c *il_operand_type;
    73 
    74 
    74 
    75 
    75   public:
    76   public:
    76     visit_expression_type_c(symbol_c *search_scope);
    77     visit_expression_type_c(symbol_c *ignore);
    77     virtual ~visit_expression_type_c(void);
    78     virtual ~visit_expression_type_c(void);
    78 
    79 
       
    80     bool get_error_found(void);
    79 
    81 
    80     typedef struct {
    82     typedef struct {
    81       symbol_c *value;
    83       symbol_c *value;
    82       symbol_c *type;
    84       symbol_c *type;
    83     } value_and_type_t; 
    85     } value_and_type_t; 
   189 
   191 
   190     /* A helper function... */
   192     /* A helper function... */
   191     typedef bool (visit_expression_type_c::*is_data_type_t)(symbol_c *type_symbol);  /* a pointer to a function! */
   193     typedef bool (visit_expression_type_c::*is_data_type_t)(symbol_c *type_symbol);  /* a pointer to a function! */
   192 //    symbol_c *compute_boolean_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
   194 //    symbol_c *compute_boolean_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
   193 //    symbol_c *compute_numeric_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
   195 //    symbol_c *compute_numeric_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
   194     symbol_c *compute_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
   196 //    symbol_c *compute_expression(symbol_c *left_exp, symbol_c *right_exp, is_data_type_t is_data_type);
       
   197     symbol_c *compute_expression(symbol_c *left_type, symbol_c *right_type, is_data_type_t is_data_type,
       
   198                                  symbol_c *left_expr=NULL, symbol_c *right_expr=NULL);
       
   199 
   195 
   200 
   196     /* a helper function... */
   201     /* a helper function... */
   197     symbol_c *base_type(symbol_c *symbol);
   202     symbol_c *base_type(symbol_c *symbol);
   198 
   203 
   199     /* a helper function... */
   204     /* a helper function... */
   200     void *verify_null(symbol_c *symbol);
   205     void *verify_null(symbol_c *symbol);
   201 
       
   202 
       
   203 
       
   204 
   206 
   205     /*********************/
   207     /*********************/
   206     /* B 1.4 - Variables */
   208     /* B 1.4 - Variables */
   207     /*********************/
   209     /*********************/
   208     void *visit(symbolic_variable_c *symbol);
   210     void *visit(symbolic_variable_c *symbol);