Class: AdLint::Cc1::CompoundStatement

Inherits:
Statement show all
Defined in:
lib/adlint/cc1/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from Statement

#executed

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods inherited from Statement

#executed?

Methods inherited from SyntaxNode

#head_location, #short_class_name, #tail_location

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

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_itemsObject (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

#locationObject



3476
3477
3478
# File 'lib/adlint/cc1/syntax.rb', line 3476

def location
  head_location
end