Class: AdLint::Cc1::DeclarationSpecifiers
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::DeclarationSpecifiers
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#function_specifier ⇒ Object
Returns the value of attribute function_specifier.
-
#storage_class_specifier ⇒ Object
Returns the value of attribute storage_class_specifier.
-
#type_qualifiers ⇒ Object
readonly
Returns the value of attribute type_qualifiers.
-
#type_specifiers ⇒ Object
readonly
Returns the value of attribute type_specifiers.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #explicitly_typed? ⇒ Boolean
- #implicitly_typed? ⇒ Boolean
-
#initialize ⇒ DeclarationSpecifiers
constructor
A new instance of DeclarationSpecifiers.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize ⇒ DeclarationSpecifiers
Returns a new instance of DeclarationSpecifiers.
2664 2665 2666 2667 2668 2669 2670 |
# File 'lib/adlint/cc1/syntax.rb', line 2664 def initialize super @storage_class_specifier = nil @function_specifier = nil @type_qualifiers = [] @type_specifiers = [] end |
Instance Attribute Details
#function_specifier ⇒ Object
Returns the value of attribute function_specifier.
2673 2674 2675 |
# File 'lib/adlint/cc1/syntax.rb', line 2673 def function_specifier @function_specifier end |
#storage_class_specifier ⇒ Object
Returns the value of attribute storage_class_specifier.
2672 2673 2674 |
# File 'lib/adlint/cc1/syntax.rb', line 2672 def storage_class_specifier @storage_class_specifier end |
#type_qualifiers ⇒ Object (readonly)
Returns the value of attribute type_qualifiers.
2674 2675 2676 |
# File 'lib/adlint/cc1/syntax.rb', line 2674 def type_qualifiers @type_qualifiers end |
#type_specifiers ⇒ Object (readonly)
Returns the value of attribute type_specifiers.
2675 2676 2677 |
# File 'lib/adlint/cc1/syntax.rb', line 2675 def type_specifiers @type_specifiers end |
Instance Method Details
#explicitly_typed? ⇒ Boolean
2681 2682 2683 |
# File 'lib/adlint/cc1/syntax.rb', line 2681 def explicitly_typed? !implicitly_typed? end |
#implicitly_typed? ⇒ Boolean
2685 2686 2687 |
# File 'lib/adlint/cc1/syntax.rb', line 2685 def implicitly_typed? @type_specifiers.empty? end |
#inspect(indent = 0) ⇒ Object
2689 2690 2691 |
# File 'lib/adlint/cc1/syntax.rb', line 2689 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
2677 2678 2679 |
# File 'lib/adlint/cc1/syntax.rb', line 2677 def location head_location end |