Class: AdLint::Cc1::ParameterDeclaration

Inherits:
SyntaxNode
  • Object
show all
Includes:
DeclarationSpecifiersHolder
Defined in:
lib/adlint/cc1/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods included from DeclarationSpecifiersHolder

#explicitly_typed?, #function_specifier, #implicitly_typed?, #storage_class_specifier, #type_qualifiers, #type_specifiers

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(dcl_specs, dcr) ⇒ ParameterDeclaration

Returns a new instance of ParameterDeclaration.



3338
3339
3340
3341
3342
3343
# File 'lib/adlint/cc1/syntax.rb', line 3338

def initialize(dcl_specs, dcr)
  super()
  @declaration_specifiers = dcl_specs
  @declarator = dcr
  @type = nil
end

Instance Attribute Details

#declaration_specifiersObject (readonly)

Returns the value of attribute declaration_specifiers.



3345
3346
3347
# File 'lib/adlint/cc1/syntax.rb', line 3345

def declaration_specifiers
  @declaration_specifiers
end

#declaratorObject (readonly)

Returns the value of attribute declarator.



3346
3347
3348
# File 'lib/adlint/cc1/syntax.rb', line 3346

def declarator
  @declarator
end

#typeObject

Returns the value of attribute type.



3347
3348
3349
# File 'lib/adlint/cc1/syntax.rb', line 3347

def type
  @type
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



3353
3354
3355
# File 'lib/adlint/cc1/syntax.rb', line 3353

def inspect(indent = 0)
  " " * indent + short_class_name
end

#locationObject



3349
3350
3351
# File 'lib/adlint/cc1/syntax.rb', line 3349

def location
  @declarator ? @declarator.location : @declaration_specifiers.location
end