aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/parser/operator.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-13 08:39:02 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-13 08:42:08 +0300
commit6913c6d965d64481ed09fc06a43154f35e8bd914 (patch)
treefa8d3f360a651a31fba4b91a09a5bba505a904c4 /server/parser/operator.hpp
parentTravis: only run clang-format on master (diff)
downloadmath-server-6913c6d965d64481ed09fc06a43154f35e8bd914.tar.gz
math-server-6913c6d965d64481ed09fc06a43154f35e8bd914.zip
clang-format all the code
Diffstat (limited to 'server/parser/operator.hpp')
-rw-r--r--server/parser/operator.hpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/server/parser/operator.hpp b/server/parser/operator.hpp
index fd45aa2..9030c65 100644
--- a/server/parser/operator.hpp
+++ b/server/parser/operator.hpp
@@ -5,10 +5,9 @@
#pragma once
-#include "error.hpp"
-
#include "../lexer/token.hpp"
#include "../lexer/token_type.hpp"
+#include "error.hpp"
#include <cmath>
@@ -72,9 +71,7 @@ public:
}
}
- bool is_left_associative() const {
- return !is_right_associative();
- }
+ bool is_left_associative() const { return !is_right_associative(); }
double exec(double lhs, double rhs) const {
switch (m_type) {
@@ -103,11 +100,9 @@ public:
}
private:
- explicit BinaryOp(const Token& token)
- : m_type{token.get_type()}
- { }
+ explicit BinaryOp(const Token& token) : m_type{token.get_type()} {}
Type m_type;
};
-}
+} // namespace math::server::parser