Added unary operators +, -, ~ and !

This commit is contained in:
WerWolv
2021-01-07 00:41:06 +01:00
parent acfd5aa02f
commit b30bb21646
5 changed files with 34 additions and 4 deletions

View File

@@ -242,6 +242,9 @@ namespace hex::lang {
} else if (c == '<') {
tokens.emplace_back(TOKEN(Operator, BoolLessThan));
offset += 1;
} else if (c == '!') {
tokens.emplace_back(TOKEN(Operator, BoolNot));
offset += 1;
} else if (c == '|') {
tokens.emplace_back(TOKEN(Operator, BitOr));
offset += 1;
@@ -251,6 +254,9 @@ namespace hex::lang {
} else if (c == '^') {
tokens.emplace_back(TOKEN(Operator, BitXor));
offset += 1;
} else if (c == '~') {
tokens.emplace_back(TOKEN(Operator, BitNot));
offset += 1;
} else if (c == '\'') {
offset += 1;