aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/lexer/token_type.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-30 13:06:13 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-31 19:43:25 +0300
commit372064af20a456989c2a9ea2fda6e535d74dbafd (patch)
tree9cc9039586252bda5ef44a68db9f53627a87ce4b /server/lexer/token_type.cpp
parentadd .dockerignore (diff)
downloadmath-server-372064af20a456989c2a9ea2fda6e535d74dbafd.tar.gz
math-server-372064af20a456989c2a9ea2fda6e535d74dbafd.zip
support the power (^) operator
It doesn't work with the unary minus currently (as is reflected in the tests), it should have a higher precedence.
Diffstat (limited to 'server/lexer/token_type.cpp')
-rw-r--r--server/lexer/token_type.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/lexer/token_type.cpp b/server/lexer/token_type.cpp
index cafb403..6a42a3d 100644
--- a/server/lexer/token_type.cpp
+++ b/server/lexer/token_type.cpp
@@ -35,6 +35,7 @@ private:
{Type::MINUS, "-"},
{Type::ASTERISK, "*"},
{Type::SLASH, "/"},
+ {Type::CARET, "^"},
{Type::LEFT_PAREN, "("},
{Type::RIGHT_PAREN, ")"},
{Type::NUMBER, "number"},