class YARP::NextNode
Represents the use of the ‘next` keyword.
next 1 ^^^^^^
Attributes
arguments[R]
attr_reader arguments: ArgumentsNode
?
keyword_loc[R]
attr_reader keyword_loc
: Location
Public Class Methods
new(arguments, keyword_loc, location)
click to toggle source
def initialize: (arguments: ArgumentsNode
?, keyword_loc
: Location
, location: Location
) -> void
# File yarp/node.rb, line 7725 def initialize(arguments, keyword_loc, location) @arguments = arguments @keyword_loc = keyword_loc @location = location end
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File yarp/node.rb, line 7732 def accept(visitor) visitor.visit_next_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File yarp/node.rb, line 7737 def child_nodes [arguments] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File yarp/node.rb, line 7742 def comment_targets [*arguments, keyword_loc] end
copy(**params)
click to toggle source
def copy: (**params) -> NextNode
# File yarp/node.rb, line 7747 def copy(**params) NextNode.new( params.fetch(:arguments) { arguments }, params.fetch(:keyword_loc) { keyword_loc }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
inspect(inspector = NodeInspector.new)
click to toggle source
# File yarp/node.rb, line 7768 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) if (arguments = self.arguments).nil? inspector << "├── arguments: ∅\n" else inspector << "├── arguments:\n" inspector << arguments.inspect(inspector.child_inspector("│ ")).delete_prefix(inspector.prefix) end inspector << "└── keyword_loc: #{inspector.location(keyword_loc)}\n" inspector.to_str end
keyword()
click to toggle source
def keyword: () -> String
# File yarp/node.rb, line 7764 def keyword keyword_loc.slice end