Class: AdLint::Cc1::ParameterDeclaration
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::ParameterDeclaration
- Includes:
- DeclarationSpecifiersHolder
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#declaration_specifiers ⇒ Object
readonly
Returns the value of attribute declaration_specifiers.
-
#declarator ⇒ Object
readonly
Returns the value of attribute declarator.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(dcl_specs, dcr) ⇒ ParameterDeclaration
constructor
A new instance of ParameterDeclaration.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
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
Methods included from Visitable
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_specifiers ⇒ Object (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 |
#declarator ⇒ Object (readonly)
Returns the value of attribute declarator.
3346 3347 3348 |
# File 'lib/adlint/cc1/syntax.rb', line 3346 def declarator @declarator end |
#type ⇒ Object
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 |
#location ⇒ Object
3349 3350 3351 |
# File 'lib/adlint/cc1/syntax.rb', line 3349 def location @declarator ? @declarator.location : @declaration_specifiers.location end |