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.
8814 8815 8816 8817 |
# File 'lib/syntax_tree/node.rb', line 8814 def initialize(location:, comments: []) @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
- Array[ Comment | EmbDoc ]
-
the comments attached to this node
8812 8813 8814 |
# File 'lib/syntax_tree/node.rb', line 8812 def comments @comments end |
#location ⇒ Object (readonly)
- Location
-
the location of this node
8809 8810 8811 |
# File 'lib/syntax_tree/node.rb', line 8809 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
8819 8820 8821 |
# File 'lib/syntax_tree/node.rb', line 8819 def accept(visitor) visitor.visit_void_stmt(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
8823 8824 8825 |
# File 'lib/syntax_tree/node.rb', line 8823 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
8829 8830 8831 |
# File 'lib/syntax_tree/node.rb', line 8829 def deconstruct_keys(keys) { location: location, comments: comments } end |
#format(q) ⇒ Object
8833 8834 |
# File 'lib/syntax_tree/node.rb', line 8833 def format(q) end |