Skip to content

Commit e76218c

Browse files
committed
Merge branch 'az/grep-group-error-message-update'
Error message clarification. * az/grep-group-error-message-update: grep: improve errors for unmatched ( and )
2 parents eda72dd + 0d52784 commit e76218c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ static struct grep_expr *compile_pattern_atom(struct grep_pat **list)
621621
*list = p->next;
622622
x = compile_pattern_or(list);
623623
if (!*list || (*list)->token != GREP_CLOSE_PAREN)
624-
die("unmatched parenthesis");
624+
die("unmatched ( for expression group");
625625
*list = (*list)->next;
626626
return x;
627627
default:
@@ -792,7 +792,7 @@ void compile_grep_patterns(struct grep_opt *opt)
792792
if (p)
793793
opt->pattern_expression = compile_pattern_expr(&p);
794794
if (p)
795-
die("incomplete pattern expression: %s", p->pattern);
795+
die("incomplete pattern expression group: %s", p->pattern);
796796

797797
if (opt->no_body_match && opt->pattern_expression)
798798
opt->pattern_expression = grep_not_expr(opt->pattern_expression);

0 commit comments

Comments
 (0)