diff options
| author | _ov4 <ov4@ov4.org> | 2026-09-08 07:23:21 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-09-08 07:23:21 +0000 |
| commit | f95d5ffb0f50c84022534eab5f08c86b8b1db60c (patch) | |
| tree | 20bb830025df1b8baf256871723ac6142e243b59 /include | |
| parent | ff52db161fe0a38bb00a2a6c8a0893c4d2a570a7 (diff) | |
new
Diffstat (limited to 'include')
| -rw-r--r-- | include/lexer/symbol_property.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/lexer/symbol_property.h b/include/lexer/symbol_property.h new file mode 100644 index 0000000..24f30c1 --- /dev/null +++ b/include/lexer/symbol_property.h @@ -0,0 +1,33 @@ +#pragma once + +#include <unordered_map> +#include <string> +#include "lexer/enum_type.h" + +using namespace std; + +namespace ov4 +{ + +class T_property +{ +public: + int operand_number = 0; + bool continuable = true; + int pivot_priority = -1; + enum_token_type type = TEXT; +}; + +unordered_map<string, T_property> symbol_property = { + // non-operator + {"\'", {.type = SINGLE_QUOTATION}}, + {"\"", {.type = SINGLE_QUOTATION}}, + + // operator + {"&", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .type = ASYNC}}, + {"|", {.operand_number = 1, .continuable = true, .pivot_priority = 100, .type = PIPE}}, + {"&&", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .type = LOGIC_AND}}, + {"||", {.operand_number = 1, .continuable = true, .pivot_priority = 1000, .type = LOGIC_OR}}, +}; + +} |
