diff options
| author | _ov4 <ov4@ov4.org> | 2026-09-09 12:39:15 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-09-09 12:39:15 +0000 |
| commit | da12cca68e56a8e75103a7a12b6cdb4299517b4e (patch) | |
| tree | a0ab23d46ab88a05a7dec425b78bab9cdb62c8be /include/lexer | |
| parent | ffcf768d07c82a2213674fbec623c684e8feb9ee (diff) | |
fix enum leaking and ast children conditions
Diffstat (limited to 'include/lexer')
| -rw-r--r-- | include/lexer/enum_type.h | 2 | ||||
| -rw-r--r-- | include/lexer/symbol_property.h | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/lexer/enum_type.h b/include/lexer/enum_type.h index e1c5b6f..bfc7cdc 100644 --- a/include/lexer/enum_type.h +++ b/include/lexer/enum_type.h @@ -25,7 +25,7 @@ enum guard_type GUARD_STRONG, }; -enum child_existance_type +enum class child_existence_type { NOT_EXIST, OPTIONAL, diff --git a/include/lexer/symbol_property.h b/include/lexer/symbol_property.h index 53120e0..a69d665 100644 --- a/include/lexer/symbol_property.h +++ b/include/lexer/symbol_property.h @@ -19,8 +19,8 @@ public: // require: MUST // accept: optional, but if it doesn't accept, but there is indeed a child, then error - child_existance_type left; - child_existance_type right; + child_existence_type left; + child_existence_type right; enum_token_type enum_type = TEXT; }; @@ -35,10 +35,10 @@ inline unordered_map<string, T_property> symbol_property = { {")", {.continuable = false, .enum_type = RIGHT_BRACKET}}, // operator - {"&", {.operand_number = 1, .continuable = true, .pivot_priority = 2000, .left = EXIST, .right = NOT_EXIST, .enum_type = ASYNC}}, - {"|", {.operand_number = 1, .continuable = true, .pivot_priority = 100, .left = EXIST, .right = EXIST, .enum_type = PIPE}}, - {"&&", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .left = EXIST, .right = EXIST, .enum_type = LOGIC_AND}}, - {"||", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .left = EXIST, .right = EXIST, .enum_type = LOGIC_OR}}, + {"&", {.operand_number = 1, .continuable = true, .pivot_priority = 2000, .left = child_existence_type::EXIST, .right = child_existence_type::NOT_EXIST, .enum_type = ASYNC}}, + {"|", {.operand_number = 1, .continuable = true, .pivot_priority = 100, .left = child_existence_type::EXIST, .right = child_existence_type::EXIST, .enum_type = PIPE}}, + {"&&", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .left = child_existence_type::EXIST, .right = child_existence_type::EXIST, .enum_type = LOGIC_AND}}, + {"||", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .left = child_existence_type::EXIST, .right = child_existence_type::EXIST, .enum_type = LOGIC_OR}}, }; |
