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

method_source doesn't work with Prism #82

Open
eregon opened this issue Apr 25, 2024 · 0 comments · May be fixed by #84
Open

method_source doesn't work with Prism #82

eregon opened this issue Apr 25, 2024 · 0 comments · May be fixed by #84

Comments

@eregon
Copy link

eregon commented Apr 25, 2024

Because

GENERIC_REGEXPS = [
/unexpected (\$end|end-of-file|end-of-input|END_OF_FILE)/, # mri, jruby, ruby-2.0, ironruby
/embedded document meets end of file/, # =begin
/unterminated (quoted string|string|regexp|list) meets end of file/, # "quoted string" is ironruby
/can't find string ".*" anywhere before EOF/, # rbx and jruby
/missing 'end' for/, /expecting kWHEN/ # rbx
]

and Prism uses different SyntaxError messages.

I wonder, does method_source need to filter SyntaxError messages or could it just keep adding inputs until no more SyntaxError (or EOF)?

Ref: ruby/prism#2734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant