[ruby/prism] Reverse-sync ruby/ruby and deprecate old fields

https://github.com/ruby/prism/commit/bc21c9f3ee
This commit is contained in:
Kevin Newton 2024-08-28 15:07:09 -04:00 коммит произвёл git
Родитель 417bb8d4fd
Коммит 45f32e3a50
1 изменённых файлов: 45 добавлений и 0 удалений

Просмотреть файл

@ -460,4 +460,49 @@ module Prism
binary_operator_loc
end
end
class CaseMatchNode < Node
# Returns the else clause of the case match node. This method is deprecated
# in favor of #else_clause.
def consequent
deprecated("else_clause")
else_clause
end
end
class CaseNode < Node
# Returns the else clause of the case node. This method is deprecated in
# favor of #else_clause.
def consequent
deprecated("else_clause")
else_clause
end
end
class IfNode < Node
# Returns the subsequent if/elsif/else clause of the if node. This method is
# deprecated in favor of #subsequent.
def consequent
deprecated("subsequent")
subsequent
end
end
class RescueNode < Node
# Returns the subsequent rescue clause of the rescue node. This method is
# deprecated in favor of #subsequent.
def consequent
deprecated("subsequent")
subsequent
end
end
class UnlessNode < Node
# Returns the else clause of the unless node. This method is deprecated in
# favor of #else_clause.
def consequent
deprecated("else_clause")
else_clause
end
end
end