diff options
Diffstat (limited to 'src/lang_analysis/symbol_property.cc')
| -rw-r--r-- | src/lang_analysis/symbol_property.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/lang_analysis/symbol_property.cc b/src/lang_analysis/symbol_property.cc new file mode 100644 index 0000000..bb5015c --- /dev/null +++ b/src/lang_analysis/symbol_property.cc @@ -0,0 +1,29 @@ +#include "lang_analysis/symbol_property.h" + +#include <string> + +#include "lang_analysis/enum_type.h" + +using namespace std; + +namespace ov4 +{ + +string symbol_enum2string(enum_token_type e) +{ + for (auto &c : symbol_property) + { + // pair<string, T_property> + + if (c.second.enum_type == e) + return c.first; + } + return ""; +} + +bool symbol_contains_enum_type(enum_token_type e) +{ + return (symbol_enum2string(e) == "") ? false : true; +} + +} |
