Skip to content

Commit

Permalink
Fix pattern with constant, (, and newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Feb 16, 2024
1 parent 7c0446e commit d69d1b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -13460,9 +13460,11 @@ parse_pattern_constant_path(pm_parser_t *parser, pm_node_t *node) {
} else {
parser_lex(parser);
opening = parser->previous;
accept1(parser, PM_TOKEN_NEWLINE);

if (!accept1(parser, PM_TOKEN_PARENTHESIS_RIGHT)) {
inner = parse_pattern(parser, true, PM_ERR_PATTERN_EXPRESSION_AFTER_PAREN);
accept1(parser, PM_TOKEN_NEWLINE);
expect1(parser, PM_TOKEN_PARENTHESIS_RIGHT, PM_ERR_PATTERN_TERM_PAREN);
}

Expand Down

0 comments on commit d69d1b6

Please sign in to comment.