Class: YARP::NextNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::NextNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents the use of the ‘next` keyword.
next 1
^^^^^^
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
attr_reader arguments: Node?.
-
#keyword_loc ⇒ Object
readonly
attr_reader keyword_loc: Location.
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(arguments, keyword_loc, location) ⇒ NextNode
constructor
def initialize: (arguments: Node?, keyword_loc: Location, location: Location) -> void.
-
#keyword ⇒ Object
def keyword: () -> String.
Constructor Details
#initialize(arguments, keyword_loc, location) ⇒ NextNode
def initialize: (arguments: Node?, keyword_loc: Location, location: Location) -> void
4294 4295 4296 4297 4298 |
# File 'lib/yarp/node.rb', line 4294 def initialize(arguments, keyword_loc, location) @arguments = arguments @keyword_loc = keyword_loc @location = location end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
attr_reader arguments: Node?
4288 4289 4290 |
# File 'lib/yarp/node.rb', line 4288 def arguments @arguments end |
#keyword_loc ⇒ Object (readonly)
attr_reader keyword_loc: Location
4291 4292 4293 |
# File 'lib/yarp/node.rb', line 4291 def keyword_loc @keyword_loc end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
4301 4302 4303 |
# File 'lib/yarp/node.rb', line 4301 def accept(visitor) visitor.visit_next_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
4307 4308 4309 |
# File 'lib/yarp/node.rb', line 4307 def child_nodes [arguments] end |
#deconstruct_keys(keys) ⇒ Object
4315 4316 4317 |
# File 'lib/yarp/node.rb', line 4315 def deconstruct_keys(keys) { arguments: arguments, keyword_loc: keyword_loc, location: location } end |
#keyword ⇒ Object
def keyword: () -> String
4320 4321 4322 |
# File 'lib/yarp/node.rb', line 4320 def keyword keyword_loc.slice end |