Skip to content

Commit 42637c1

Browse files
committed
Avoid duplicate diagnostic messages for closing brackets
This error condition is checked and reported as part of bump_closing_token.
1 parent b5eb9eb commit 42637c1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/parser.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2982,14 +2982,7 @@ function parse_brackets(after_parse::Function,
29822982
# (x \n\n for a in as) ==> (generator x (= a as))
29832983
parse_generator(ps, mark)
29842984
else
2985-
if is_closing_token(ps, k)
2986-
k_str = untokenize(k, unique=false)
2987-
emit_diagnostic(ps, error="unexpected `$k_str` in bracketed list")
2988-
else
2989-
ck_str = untokenize(closing_kind)
2990-
emit_diagnostic(ps, error="missing comma or $ck_str in bracketed list")
2991-
end
2992-
# Recovery done after loop
2985+
# Error - recovery done when consuming closing_kind
29932986
break
29942987
end
29952988
end

0 commit comments

Comments
 (0)