Parser::Translator
is accepting certain regexp flags where parser
would raise
#2957
Labels
Parser::Translator
is accepting certain regexp flags where parser
would raise
#2957
With plain
parser
, the following raises an error:Prism translation seems to ignore the
n
flag (but returns no ast):There's an open issue in
rubocop-ast
for this to not raise during parsing (rubocop/rubocop-ast#305) but still a behaviour difference.parser
has the following code to construct a regexp. Maybe it just needs to be emulated? https://github.com/whitequark/parser/blob/570e06520b81a107948d10fadaea89bd612b9a8d/lib/parser/builders/default.rb#L2249-L2267The text was updated successfully, but these errors were encountered: