Class: AdLint::Cc1::DefaultLabeledStatement

Inherits:
LabeledStatement 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(stmt) ⇒ DefaultLabeledStatement

Returns a new instance of DefaultLabeledStatement.



3432
3433
3434
3435
# File 'lib/adlint/cc1/syntax.rb', line 3432

def initialize(stmt)
  super()
  @statement = stmt
end

Instance Attribute Details

#normalized_expressionObject

Returns the value of attribute normalized_expression.



3438
3439
3440
# File 'lib/adlint/cc1/syntax.rb', line 3438

def normalized_expression
  @normalized_expression
end

#statementObject (readonly)

Returns the value of attribute statement.



3437
3438
3439
# File 'lib/adlint/cc1/syntax.rb', line 3437

def statement
  @statement
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



3444
3445
3446
# File 'lib/adlint/cc1/syntax.rb', line 3444

def inspect(indent = 0)
  " " * indent + "#{short_class_name}\n" + @statement.inspect(indent + 1)
end

#locationObject



3440
3441
3442
# File 'lib/adlint/cc1/syntax.rb', line 3440

def location
  head_location
end