Fix parsing issue that allowed spaces around ':' for method calls

This commit is contained in:
Bruce Hill 2024-11-30 14:09:04 -05:00
parent fed63d8ea1
commit 566f97307d

View File

@ -1633,8 +1633,8 @@ ast_t *parse_method_call_suffix(parse_ctx_t *ctx, ast_t *self) {
const char *start = self->start;
const char *pos = self->end;
spaces(&pos);
if (!match(&pos, ":")) return NULL;
if (*pos == ' ') return NULL;
const char *fn = get_id(&pos);
if (!fn) return NULL;
spaces(&pos);