Class: AdLint::Cc1::CompoundStatement
- Inherits:
-
Statement
- Object
- SyntaxNode
- Statement
- AdLint::Cc1::CompoundStatement
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#block_items ⇒ Object
readonly
Returns the value of attribute block_items.
Attributes inherited from Statement
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(block_items) ⇒ CompoundStatement
constructor
A new instance of CompoundStatement.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from Statement
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(block_items) ⇒ CompoundStatement
Returns a new instance of CompoundStatement.
3469 3470 3471 3472 |
# File 'lib/adlint/cc1/syntax.rb', line 3469 def initialize(block_items) super() @block_items = block_items end |
Instance Attribute Details
#block_items ⇒ Object (readonly)
Returns the value of attribute block_items.
3474 3475 3476 |
# File 'lib/adlint/cc1/syntax.rb', line 3474 def block_items @block_items end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
3480 3481 3482 3483 |
# File 'lib/adlint/cc1/syntax.rb', line 3480 def inspect(indent = 0) ([" " * indent + short_class_name] + @block_items.map { |item| item.inspect(indent + 1) }).join("\n") end |
#location ⇒ Object
3476 3477 3478 |
# File 'lib/adlint/cc1/syntax.rb', line 3476 def location head_location end |