diff options
| author | _ov4 <ov4@ov4.org> | 2026-09-09 10:57:22 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-09-09 10:57:22 +0000 |
| commit | 7ec58e8db1096e7916f99b84011ddb13a010da75 (patch) | |
| tree | e3da5c2c45a53881e5c86d5a6b53b48c178684db /include/lexer/symbol_property.h | |
| parent | 39715efcc89480be7e1c4f89946c680e05496a25 (diff) | |
separate compilation
Diffstat (limited to 'include/lexer/symbol_property.h')
| -rw-r--r-- | include/lexer/symbol_property.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/include/lexer/symbol_property.h b/include/lexer/symbol_property.h index 5fc0bd6..53120e0 100644 --- a/include/lexer/symbol_property.h +++ b/include/lexer/symbol_property.h @@ -2,6 +2,7 @@ #include <unordered_map> #include <string> + #include "lexer/enum_type.h" using namespace std; @@ -24,7 +25,7 @@ public: enum_token_type enum_type = TEXT; }; -unordered_map<string, T_property> symbol_property = { +inline unordered_map<string, T_property> symbol_property = { // non-operator {"\'", {.enum_type = SINGLE_QUOTATION}}, {"\"", {.enum_type = SINGLE_QUOTATION}}, @@ -41,21 +42,8 @@ unordered_map<string, T_property> symbol_property = { }; -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 ""; -} +string symbol_enum2string(enum_token_type e); -bool symbol_contains_enum_type(enum_token_type e) -{ - return (symbol_enum2string(e) == "") ? false : true; -} +bool symbol_contains_enum_type(enum_token_type e); } |
