Class: AdLint::Cc1::TypedefDeclaration
- Inherits:
-
TypeDeclaration
- Object
- SyntaxNode
- TypeDeclaration
- AdLint::Cc1::TypedefDeclaration
- Includes:
- DeclarationSpecifiersHolder
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#declaration_specifiers ⇒ Object
readonly
Returns the value of attribute declaration_specifiers.
-
#init_declarator ⇒ Object
readonly
Returns the value of attribute init_declarator.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from TypeDeclaration
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #declarator ⇒ Object
- #identifier ⇒ Object
-
#initialize(dcl_specs, init_dcr, sym) ⇒ TypedefDeclaration
constructor
A new instance of TypedefDeclaration.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods included from DeclarationSpecifiersHolder
#explicitly_typed?, #function_specifier, #implicitly_typed?, #storage_class_specifier, #type_qualifiers, #type_specifiers
Methods included from SymbolicElement
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(dcl_specs, init_dcr, sym) ⇒ TypedefDeclaration
Returns a new instance of TypedefDeclaration.
2528 2529 2530 2531 2532 2533 |
# File 'lib/adlint/cc1/syntax.rb', line 2528 def initialize(dcl_specs, init_dcr, sym) super(sym) @declaration_specifiers = dcl_specs @init_declarator = init_dcr @type = nil end |
Instance Attribute Details
#declaration_specifiers ⇒ Object (readonly)
Returns the value of attribute declaration_specifiers.
2535 2536 2537 |
# File 'lib/adlint/cc1/syntax.rb', line 2535 def declaration_specifiers @declaration_specifiers end |
#init_declarator ⇒ Object (readonly)
Returns the value of attribute init_declarator.
2536 2537 2538 |
# File 'lib/adlint/cc1/syntax.rb', line 2536 def init_declarator @init_declarator end |
#type ⇒ Object
Returns the value of attribute type.
2537 2538 2539 |
# File 'lib/adlint/cc1/syntax.rb', line 2537 def type @type end |
Instance Method Details
#declarator ⇒ Object
2543 2544 2545 |
# File 'lib/adlint/cc1/syntax.rb', line 2543 def declarator @init_declarator.declarator end |
#identifier ⇒ Object
2539 2540 2541 |
# File 'lib/adlint/cc1/syntax.rb', line 2539 def identifier @init_declarator.declarator.identifier end |
#inspect(indent = 0) ⇒ Object
2551 2552 2553 2554 |
# File 'lib/adlint/cc1/syntax.rb', line 2551 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end |
#location ⇒ Object
2547 2548 2549 |
# File 'lib/adlint/cc1/syntax.rb', line 2547 def location identifier.location end |