Skip to content

Commit 1497241

Browse files
committed
Remove unused operators
1 parent 001102c commit 1497241

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

libjsonexpr/src/parse.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,18 @@ try_parse_unary(depth_counter depth, std::span<const token>& tokens) {
793793
}
794794

795795
// From least to highest precedence. Operators with the same precedence are evaluated left-to-right.
796+
// clang-format off
796797
const std::vector<std::vector<std::string_view>> operator_precedence = {
797-
{"||", "or"}, {"&&", "and"}, {"in", "not in"}, {"==", "!="},
798-
{"<", "<=", ">", ">="}, {"+", "-"}, {"*", "/", "%"}, {"^", "**"}};
798+
{"or"},
799+
{"and"},
800+
{"in", "not in"},
801+
{"==", "!="},
802+
{"<", "<=", ">", ">="},
803+
{"+", "-"},
804+
{"*", "/", "%"},
805+
{"**"},
806+
};
807+
// clang-format on
799808

800809
std::size_t get_precedence(std::string_view op) noexcept {
801810
for (std::size_t p = 0; p < operator_precedence.size(); ++p) {

0 commit comments

Comments
 (0)