Class: AdLint::Cc1::EnumTypeDeclaration
- Inherits:
-
TypeDeclaration
- Object
- SyntaxNode
- TypeDeclaration
- AdLint::Cc1::EnumTypeDeclaration
- Defined in:
- lib/adlint/cc1/syntax.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#enum_specifier ⇒ Object
readonly
Returns the value of attribute enum_specifier.
-
#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
- #enumerators ⇒ Object
- #identifier ⇒ Object
-
#initialize(enum_spec, sym) ⇒ EnumTypeDeclaration
constructor
A new instance of EnumTypeDeclaration.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
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(enum_spec, sym) ⇒ EnumTypeDeclaration
Returns a new instance of EnumTypeDeclaration.
2628 2629 2630 2631 2632 |
# File 'lib/adlint/cc1/syntax.rb', line 2628 def initialize(enum_spec, sym) super(sym) @enum_specifier = enum_spec @type = nil end |
Instance Attribute Details
#enum_specifier ⇒ Object (readonly)
Returns the value of attribute enum_specifier.
2634 2635 2636 |
# File 'lib/adlint/cc1/syntax.rb', line 2634 def enum_specifier @enum_specifier end |
#type ⇒ Object
Returns the value of attribute type.
2635 2636 2637 |
# File 'lib/adlint/cc1/syntax.rb', line 2635 def type @type end |
Instance Method Details
#enumerators ⇒ Object
2645 2646 2647 |
# File 'lib/adlint/cc1/syntax.rb', line 2645 def enumerators @enum_specifier.enumerators end |
#identifier ⇒ Object
2637 2638 2639 |
# File 'lib/adlint/cc1/syntax.rb', line 2637 def identifier @enum_specifier.identifier end |
#inspect(indent = 0) ⇒ Object
2649 2650 2651 2652 |
# File 'lib/adlint/cc1/syntax.rb', line 2649 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + "#{identifier.value}" end |
#location ⇒ Object
2641 2642 2643 |
# File 'lib/adlint/cc1/syntax.rb', line 2641 def location identifier.location end |