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.
3450 3451 3452 3453 |
# File 'lib/adlint/cc1/syntax.rb', line 3450 def initialize(block_items) super() @block_items = block_items end |
Instance Attribute Details
#block_items ⇒ Object (readonly)
Returns the value of attribute block_items.
3455 3456 3457 |
# File 'lib/adlint/cc1/syntax.rb', line 3455 def block_items @block_items end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
3461 3462 3463 3464 |
# File 'lib/adlint/cc1/syntax.rb', line 3461 def inspect(indent = 0) ([" " * indent + short_class_name] + @block_items.map { |item| item.inspect(indent + 1) }).join("\n") end |
#location ⇒ Object
3457 3458 3459 |
# File 'lib/adlint/cc1/syntax.rb', line 3457 def location head_location end |