From f95d5ffb0f50c84022534eab5f08c86b8b1db60c Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 8 Sep 2026 07:23:21 +0000 Subject: new --- include/lexer/symbol_property.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/lexer/symbol_property.h (limited to 'include') 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 +#include +#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 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}}, +}; + +} -- cgit v1.3.1-4-g156e