Fixed the variable code, replacing it with simpler arguments and using exceptions...
[fridhskrift.git] / variable / type.cpp
blob2501ac1f6590cf7f7ab4781017568428de28a15e
1 #include <fridh/symbol.hpp>
3 namespace fridh
5 variable_type variable::get_type() const
7 return type;
10 bool variable::is_floating_point_operation(variable & argument) const
12 return type == variable_type_identifier::floating_point_value || argument.type == variable_type_identifier::floating_point_value;
15 bool variable::is_integer_type() const
17 return
18 type == variable_type_identifier::signed_integer ||
19 type == variable_type_identifier::unsigned_integer;
22 bool variable::is_numeric_type() const
24 return
25 type == variable_type_identifier::signed_integer ||
26 type == variable_type_identifier::unsigned_integer ||
27 type == variable_type_identifier::floating_point_value;