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.
3357 3358 3359 3360 3361 3362 |
# File 'lib/adlint/cc1/syntax.rb', line 3357 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.
3364 3365 3366 |
# File 'lib/adlint/cc1/syntax.rb', line 3364 def declaration_specifiers @declaration_specifiers end |
#declarator ⇒ Object (readonly)
Returns the value of attribute declarator.
3365 3366 3367 |
# File 'lib/adlint/cc1/syntax.rb', line 3365 def declarator @declarator end |
#type ⇒ Object
Returns the value of attribute type.
3366 3367 3368 |
# File 'lib/adlint/cc1/syntax.rb', line 3366 def type @type end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
3372 3373 3374 |
# File 'lib/adlint/cc1/syntax.rb', line 3372 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
3368 3369 3370 |
# File 'lib/adlint/cc1/syntax.rb', line 3368 def location @declarator ? @declarator.location : @declaration_specifiers.location end |