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.
9378 9379 9380 9381 |
# File 'lib/syntax_tree/node.rb', line 9378 def initialize(location:, comments: []) @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
- Array[ Comment | EmbDoc ]
-
the comments attached to this node
9376 9377 9378 |
# File 'lib/syntax_tree/node.rb', line 9376 def comments @comments end |
#location ⇒ Object (readonly)
- Location
-
the location of this node
9373 9374 9375 |
# File 'lib/syntax_tree/node.rb', line 9373 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
9383 9384 9385 |
# File 'lib/syntax_tree/node.rb', line 9383 def accept(visitor) visitor.visit_void_stmt(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
9387 9388 9389 |
# File 'lib/syntax_tree/node.rb', line 9387 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
9393 9394 9395 |
# File 'lib/syntax_tree/node.rb', line 9393 def deconstruct_keys(keys) { location: location, comments: comments } end |
#format(q) ⇒ Object
9397 9398 |
# File 'lib/syntax_tree/node.rb', line 9397 def format(q) end |