Skip to content

Commit e799752

Browse files
committed
Infix, list, parsing
1 parent 91e3b4a commit e799752

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/parser.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4320,6 +4320,15 @@ unsigned tokenize(parser *p, bool is_arg_processing, bool is_consing)
43204320
break;
43214321
}
43224322

4323+
if (is_consing && IS_INFIX(specifier) && (priority >= 1000)) {
4324+
if (!p->do_read_term)
4325+
fprintf(stderr, "Error: syntax error, near '%s', expected, %s:%d\n", SB_cstr(p->token), get_loaded(p->m, p->m->filename), p->line_num);
4326+
4327+
p->error_desc = "operator_expected";
4328+
p->error = true;
4329+
break;
4330+
}
4331+
43234332
if ((!p->is_op || IS_PREFIX(specifier)) && !is_func && !last_op) {
43244333
if (!p->do_read_term)
43254334
fprintf(stderr, "Error: syntax error, near '%s', operator expected, %s:%d\n", SB_cstr(p->token), get_loaded(p->m, p->m->filename), p->line_num);

0 commit comments

Comments
 (0)