Class: AdLint::Cc1::MemberDeclaration
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::MemberDeclaration
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#specifier_qualifier_list ⇒ Object
readonly
Returns the value of attribute specifier_qualifier_list.
-
#struct_declarator ⇒ Object
readonly
Returns the value of attribute struct_declarator.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(spec_qual_list, struct_dcl) ⇒ MemberDeclaration
constructor
A new instance of MemberDeclaration.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
- #to_s ⇒ Object
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(spec_qual_list, struct_dcl) ⇒ MemberDeclaration
Returns a new instance of MemberDeclaration.
2879 2880 2881 2882 2883 2884 |
# File 'lib/adlint/cc1/syntax.rb', line 2879 def initialize(spec_qual_list, struct_dcl) super() @specifier_qualifier_list = spec_qual_list @struct_declarator = struct_dcl @type = nil end |
Instance Attribute Details
#specifier_qualifier_list ⇒ Object (readonly)
Returns the value of attribute specifier_qualifier_list.
2886 2887 2888 |
# File 'lib/adlint/cc1/syntax.rb', line 2886 def specifier_qualifier_list @specifier_qualifier_list end |
#struct_declarator ⇒ Object (readonly)
Returns the value of attribute struct_declarator.
2887 2888 2889 |
# File 'lib/adlint/cc1/syntax.rb', line 2887 def struct_declarator @struct_declarator end |
#type ⇒ Object
Returns the value of attribute type.
2888 2889 2890 |
# File 'lib/adlint/cc1/syntax.rb', line 2888 def type @type end |
Instance Method Details
#identifier ⇒ Object
2890 2891 2892 |
# File 'lib/adlint/cc1/syntax.rb', line 2890 def identifier @struct_declarator.declarator.identifier end |
#inspect(indent = 0) ⇒ Object
2902 2903 2904 2905 |
# File 'lib/adlint/cc1/syntax.rb', line 2902 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect}) " + identifier.value end |
#location ⇒ Object
2894 2895 2896 |
# File 'lib/adlint/cc1/syntax.rb', line 2894 def location identifier.location end |
#to_s ⇒ Object
2898 2899 2900 |
# File 'lib/adlint/cc1/syntax.rb', line 2898 def to_s "#{type.brief_image} #{identifier.value}" end |