{ "!=", 2, opid2('!','='), ASSOC_LEFT, 10, 0 },
{ "?", 3, opid2('?',':'), ASSOC_RIGHT, 9, 0 },
- { ":", 3, opid2(':','?'), ASSOC_RIGHT, 9, 0 },
{ "=", 2, opid1('='), ASSOC_RIGHT, 8, 0 },
{ "+=", 2, opid2('+','='), ASSOC_RIGHT, 8, 0 },
{ "&&", 2, opid2('&','&'), ASSOC_LEFT, 5, 0 },
{ "||", 2, opid2('|','|'), ASSOC_LEFT, 5, 0 },
+ { ":", 0, opid2(':','?'), ASSOC_RIGHT, 3, 0 },
+
{ ",", 2, opid1(','), ASSOC_LEFT, 2, 0 }
};
static const size_t fte_operator_count = (sizeof(fte_operators) / sizeof(fte_operators[0]));
vec_shrinkby(sy->ops, 1);
+ /* op(:?) has no input and no output */
+ if (!op->operands)
+ return true;
+
vec_shrinkby(sy->out, op->operands);
for (i = 0; i < op->operands; ++i) {
exprs[i] = sy->out[vec_size(sy->out)+i].out;
wantop = false;
--ternaries;
} else if (op->id == opid2(':','?')) {
- /* we don't push this operator */
if (!parser_close_paren(parser, &sy, false))
goto onerr;
+ vec_push(sy.ops, syop(parser_ctx(parser), op));
wantop = false;
++ternaries;
} else {