Class: SyntaxTree::VoidStmt
Overview
VoidStmt represents an empty lexical block of code.
;;
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
[Array[ Comment | EmbDoc ]] the comments attached to this node.
-
#location ⇒ Object
readonly
[Location] the location of this node.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
- #format(q) ⇒ Object
-
#initialize(location:, comments: []) ⇒ VoidStmt
constructor
A new instance of VoidStmt.
Methods inherited from Node
Constructor Details
#initialize(location:, comments: []) ⇒ VoidStmt
Returns a new instance of VoidStmt.
9379 9380 9381 9382 |
# File 'lib/syntax_tree/node.rb', line 9379 def initialize(location:, comments: []) @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
[Array[ Comment | EmbDoc ]] the comments attached to this node
9377 9378 9379 |
# File 'lib/syntax_tree/node.rb', line 9377 def comments @comments end |
#location ⇒ Object (readonly)
[Location] the location of this node
9374 9375 9376 |
# File 'lib/syntax_tree/node.rb', line 9374 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
9384 9385 9386 |
# File 'lib/syntax_tree/node.rb', line 9384 def accept(visitor) visitor.visit_void_stmt(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
9388 9389 9390 |
# File 'lib/syntax_tree/node.rb', line 9388 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
9394 9395 9396 |
# File 'lib/syntax_tree/node.rb', line 9394 def deconstruct_keys(keys) { location: location, comments: comments } end |
#format(q) ⇒ Object
9398 9399 |
# File 'lib/syntax_tree/node.rb', line 9398 def format(q) end |