- case OP_number:
- case OP_boolean:
- {
- static const struct operator ops[] =
- {
- { '=', OP_EQ, "numeric equality (\"=\")" },
- { T_EQ, OP_EQ, "numeric equality (\"EQ\")" },
- { T_GE, OP_GE, "numeric greater-than-or-equal-to (\">=\")" },
- { T_GT, OP_GT, "numeric greater than (\">\")" },
- { T_LE, OP_LE, "numeric less-than-or-equal-to (\"<=\")" },
- { T_LT, OP_LT, "numeric less than (\"<\")" },
- { T_NE, OP_NE, "numeric inequality (\"<>\")" },
- };
-
- return parse_binary_operators (e, node, ops, sizeof ops / sizeof *ops,
- parse_add, chain_warning);
- }
-
- case OP_string:
- {
- static const struct operator ops[] =
- {
- { '=', OP_EQ_STRING, "string equality (\"=\")" },
- { T_EQ, OP_EQ_STRING, "string equality (\"EQ\")" },
- { T_GE, OP_GE_STRING, "string greater-than-or-equal-to (\">=\")" },
- { T_GT, OP_GT_STRING, "string greater than (\">\")" },
- { T_LE, OP_LE_STRING, "string less-than-or-equal-to (\"<=\")" },
- { T_LT, OP_LT_STRING, "string less than (\"<\")" },
- { T_NE, OP_NE_STRING, "string inequality (\"<>\")" },
- };
-
- return parse_binary_operators (e, node, ops, sizeof ops / sizeof *ops,
- parse_add, chain_warning);
- }
-
- default:
- return node;
- }
+ { .token = T_EQUALS, .num_op = OP_EQ, .str_op = OP_EQ_STRING },
+ { .token = T_EQ, .num_op = OP_EQ, .str_op = OP_EQ_STRING },
+ { .token = T_GE, .num_op = OP_GE, .str_op = OP_GE_STRING },
+ { .token = T_GT, .num_op = OP_GT, .str_op = OP_GT_STRING },
+ { .token = T_LE, .num_op = OP_LE, .str_op = OP_LE_STRING },
+ { .token = T_LT, .num_op = OP_LT, .str_op = OP_LT_STRING },
+ { .token = T_NE, .num_op = OP_NE, .str_op = OP_NE_STRING },
+ };
+
+ return parse_binary_operators (lexer, e, ops, sizeof ops / sizeof *ops,
+ parse_add, chain_warning);