[ruby/prism] Fix parsing errors for :!@ and :~@ in Sorbet

https://github.com/ruby/prism/commit/dc070b44bc
This commit is contained in:
Ufuk Kayserilioglu 2024-03-06 15:17:38 -05:00 committed by git
parent de411ef0b6
commit 06fca8dbca

View File

@ -1007,16 +1007,16 @@ module Prism
bounds(last_argument.location)
on_assign(call, value)
when :-@, :+@, :~@
when :-@, :+@, :~
receiver = visit(node.receiver)
bounds(node.location)
on_unary(node.name, receiver)
when :!@
when :!
receiver = visit(node.receiver)
bounds(node.location)
on_unary(node.message == "not" ? :not : :!@, receiver)
on_unary(node.message == "not" ? :not : :!, receiver)
when *BINARY_OPERATORS
receiver = visit(node.receiver)
value = visit(node.arguments.arguments.first)