90 private: |
90 private: |
91 search_var_instance_decl_c search_var_instance_decl; |
91 search_var_instance_decl_c search_var_instance_decl; |
92 decompose_var_instance_name_c *decompose_var_instance_name; |
92 decompose_var_instance_name_c *decompose_var_instance_name; |
93 symbol_c *current_structelement_name; |
93 symbol_c *current_structelement_name; |
94 symbol_c *current_typeid; |
94 symbol_c *current_typeid; |
|
95 symbol_c *current_basetypeid; |
95 bool is_complex; |
96 bool is_complex; |
96 |
97 |
97 public: |
98 public: |
98 search_varfb_instance_type_c(symbol_c *search_scope); |
99 search_varfb_instance_type_c(symbol_c *search_scope); |
99 symbol_c *get_basetype_decl(symbol_c *variable_name); |
100 symbol_c *get_basetype_decl(symbol_c *variable_name); |
|
101 symbol_c *get_type_decl(symbol_c *variable_name); |
100 symbol_c *get_type_id(symbol_c *variable_name); |
102 symbol_c *get_type_id(symbol_c *variable_name); |
101 |
103 |
|
104 /* NOTE: this function should be remvoed/deleted. |
|
105 * However, it is currently used in stage 4, and before deleting it |
|
106 * requires that the stage4 code be analysed and fixed (i.e. replace by |
|
107 * a call to one of the above functions get_basetype_decl(), |
|
108 * get_type_decl(), get_type_id(). |
|
109 * |
|
110 * At the moment, I have a feeling that this whole class search_varfb_instance_type_c |
|
111 * will not be needed in the future (i.e. when we finish implementing type checking |
|
112 * in stage 3 correctly, where we store on each symbol in the abstract syntax |
|
113 * tree it's data type, so stage4 implementations will not need to deduce the data |
|
114 * types again), so it does not make much sense to spend more time on it. |
|
115 */ |
102 unsigned int get_vartype(symbol_c *variable_name); |
116 unsigned int get_vartype(symbol_c *variable_name); |
103 bool type_is_complex(void); |
117 bool type_is_complex(void); |
104 |
118 |
105 private: |
119 private: |
106 /* a helper function... */ |
120 /* a helper function... */ |