зеркало из https://github.com/github/ruby.git
[ruby/prism] Reverse-sync ruby/ruby and deprecate old fields
https://github.com/ruby/prism/commit/bc21c9f3ee
This commit is contained in:
Родитель
417bb8d4fd
Коммит
45f32e3a50
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче