summaryrefslogtreecommitdiff
path: root/lib/prism/translation/ruby_parser.rb
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-07-11 10:23:01 -0400
committergit <[email protected]>2024-07-11 19:46:50 +0000
commit3c3be9c6b230bcc77bbdf26996b31adc584b9698 (patch)
tree73306a5dd274a54d5ed473767f5d5ec88fb56430 /lib/prism/translation/ruby_parser.rb
parent4c696597b729197df3a1b695e079e22d5ab0c7c2 (diff)
[ruby/prism] (ruby_parser) Match match3 nodes for regular expressions
https://github.com/ruby/prism/commit/47cb73ce69
Diffstat (limited to 'lib/prism/translation/ruby_parser.rb')
-rw-r--r--lib/prism/translation/ruby_parser.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/prism/translation/ruby_parser.rb b/lib/prism/translation/ruby_parser.rb
index 5ea9be8394..c737ef7a2b 100644
--- a/lib/prism/translation/ruby_parser.rb
+++ b/lib/prism/translation/ruby_parser.rb
@@ -263,6 +263,11 @@ module Prism
when RegularExpressionNode, InterpolatedRegularExpressionNode
return s(node, :match2, visit(node.receiver), visit(node.arguments.arguments.first))
end
+
+ case node.arguments.arguments.first
+ when RegularExpressionNode, InterpolatedRegularExpressionNode
+ return s(node, :match3, visit(node.arguments.arguments.first), visit(node.receiver))
+ end
end
end