Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance regexp to account for prism error messages #954

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/irb/ruby-lex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def check_code_syntax(code, local_variables:)
# example:
# '
return :recoverable_error
when /syntax error, unexpected end-of-input/
when /unexpected end-of-input/
# "syntax error, unexpected end-of-input, expecting keyword_end"
#
# example:
Expand All @@ -240,7 +240,7 @@ def check_code_syntax(code, local_variables:)
# fuga
# end
return :recoverable_error
when /syntax error, unexpected keyword_end/
when /unexpected keyword_end/
# "syntax error, unexpected keyword_end"
#
# example:
Expand All @@ -250,7 +250,7 @@ def check_code_syntax(code, local_variables:)
# example:
# end
return :unrecoverable_error
when /syntax error, unexpected '\.'/
when /unexpected '\.'/
# "syntax error, unexpected '.'"
#
# example:
Expand Down
Loading