From 7ec58e8db1096e7916f99b84011ddb13a010da75 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 9 Sep 2026 10:57:22 +0000 Subject: separate compilation --- include/lexer/symbol_property.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'include/lexer/symbol_property.h') 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 #include + #include "lexer/enum_type.h" using namespace std; @@ -24,7 +25,7 @@ public: enum_token_type enum_type = TEXT; }; -unordered_map symbol_property = { +inline unordered_map symbol_property = { // non-operator {"\'", {.enum_type = SINGLE_QUOTATION}}, {"\"", {.enum_type = SINGLE_QUOTATION}}, @@ -41,21 +42,8 @@ unordered_map symbol_property = { }; -string symbol_enum2string(enum_token_type e) -{ - for (auto &c : symbol_property) - { - // pair - - 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); } -- cgit v1.3.1-4-g156e