190 |
190 |
191 /********************************************/ |
191 /********************************************/ |
192 /* B 1.4.1 - Directly Represented Variables */ |
192 /* B 1.4.1 - Directly Represented Variables */ |
193 /********************************************/ |
193 /********************************************/ |
194 void *search_expression_type_c::visit(direct_variable_c *symbol) { |
194 void *search_expression_type_c::visit(direct_variable_c *symbol) { |
195 switch (symbol->value[2]) { |
195 symbol_c *res; |
196 case 'X': // bit - 1 bit |
196 |
197 return (void *)&bool_type_name; |
197 /* Nope, now we assume it is a variable, and determine its type... */ |
198 case 'B': // byte - 8 bits |
198 res = search_varfb_instance_type->get_type(symbol); |
199 return (void *)&byte_type_name; |
199 if (NULL != res) return res; |
200 case 'W': // word - 16 bits |
200 |
201 return (void *)&word_type_name; |
201 return NULL; |
202 case 'D': // double word - 32 bits |
|
203 return (void *)&dword_type_name; |
|
204 case 'L': // long word - 64 bits |
|
205 return (void *)&lword_type_name; |
|
206 default: // if none of the above, then the empty string was used <=> boolean |
|
207 return (void *)&bool_type_name; |
|
208 } |
|
209 } |
202 } |
210 |
203 |
211 /*************************************/ |
204 /*************************************/ |
212 /* B 1.4.2 - Multi-element variables */ |
205 /* B 1.4.2 - Multi-element variables */ |
213 /*************************************/ |
206 /*************************************/ |