aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-07 14:42:24 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-07 14:42:24 -0500
commit9c842201f312edd483ee99dcf3e321bdac2a7073 (patch)
treebb0b00e50fd6661cdf5692cb51e9ddebb151fc50 /parse.c
parentbd3df661656adecae089045a5afa51a46b94666b (diff)
Bugfix for parsing empty method call names
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index c63b23df..895b2861 100644
--- a/parse.c
+++ b/parse.c
@@ -1601,6 +1601,7 @@ ast_t *parse_method_call_suffix(parse_ctx_t *ctx, ast_t *self) {
spaces(&pos);
if (!match(&pos, ":")) return NULL;
const char *fn = get_id(&pos);
+ if (!fn) return NULL;
spaces(&pos);
if (!match(&pos, "(")) return NULL;
whitespace(&pos);