diff options
Diffstat (limited to '')
| -rw-r--r-- | server/parser/operator.hpp | 12 | ||||
| -rw-r--r-- | server/parser/parser.hpp | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/server/parser/operator.hpp b/server/parser/operator.hpp index 0f88209..c4b9091 100644 --- a/server/parser/operator.hpp +++ b/server/parser/operator.hpp @@ -40,7 +40,9 @@ public: return BinaryOp{token}; } - static constexpr unsigned min_precedence() { return 0; } + static constexpr unsigned min_precedence() { + return 0; + } static unsigned get_precedence(Type type) { switch (type) { @@ -60,7 +62,9 @@ public: } } - unsigned get_precedence() const { return get_precedence(m_type); } + unsigned get_precedence() const { + return get_precedence(m_type); + } bool is_right_associative() const { switch (m_type) { @@ -72,7 +76,9 @@ 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) { diff --git a/server/parser/parser.hpp b/server/parser/parser.hpp index 07efad5..5b17f70 100644 --- a/server/parser/parser.hpp +++ b/server/parser/parser.hpp @@ -36,7 +36,9 @@ public: private: // DMAS as in Division, Multiplication, Addition and Subtraction - double exec_dmas() { return exec_binary_op(exec_factor(), parser::BinaryOp::min_precedence()); } + double exec_dmas() { + return exec_binary_op(exec_factor(), parser::BinaryOp::min_precedence()); + } // Exponentiation operator double exec_exp() { |
