equal
deleted
inserted
replaced
52 * The class constructor must be given the search scope |
52 * The class constructor must be given the search scope |
53 * (function, function block or program within which |
53 * (function, function block or program within which |
54 * the possible il_operand variable instance was declared). |
54 * the possible il_operand variable instance was declared). |
55 */ |
55 */ |
56 |
56 |
57 class search_il_operand_type_c { |
57 #include "../../absyntax_utils/search_il_operand_type.hh" |
58 |
|
59 private: |
|
60 search_varfb_instance_type_c search_varfb_instance_type; |
|
61 search_constant_type_c search_constant_type; |
|
62 |
|
63 public: |
|
64 search_il_operand_type_c(symbol_c *search_scope): search_varfb_instance_type(search_scope) {} |
|
65 |
|
66 public: |
|
67 symbol_c *get_type(symbol_c *il_operand) { |
|
68 symbol_c *res; |
|
69 |
|
70 /* We first assume that it is a constant... */ |
|
71 res = search_constant_type.get_type(il_operand); |
|
72 if (res != NULL) return res; |
|
73 |
|
74 /* Nope, now we assume it is a variable, and determine its type... */ |
|
75 res = search_varfb_instance_type.get_type(il_operand); |
|
76 if (NULL != res) return res; |
|
77 |
|
78 /* not found */ |
|
79 return NULL; |
|
80 } |
|
81 }; |
|
82 |
58 |
83 |
59 |
84 |
60 |
85 /***********************************************************************/ |
61 /***********************************************************************/ |
86 /***********************************************************************/ |
62 /***********************************************************************/ |