Class: AdLint::Cc1::StructDeclaration
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::StructDeclaration
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#specifier_qualifier_list ⇒ Object
readonly
Returns the value of attribute specifier_qualifier_list.
-
#struct_declarators ⇒ Object
readonly
Returns the value of attribute struct_declarators.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(spec_qual_list, struct_dcrs) ⇒ StructDeclaration
constructor
A new instance of StructDeclaration.
- #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_dcrs) ⇒ StructDeclaration
Returns a new instance of StructDeclaration.
2844 2845 2846 2847 2848 2849 |
# File 'lib/adlint/cc1/syntax.rb', line 2844 def initialize(spec_qual_list, struct_dcrs) super() @specifier_qualifier_list = spec_qual_list @struct_declarators = struct_dcrs @items = build_items(spec_qual_list, struct_dcrs) end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
2853 2854 2855 |
# File 'lib/adlint/cc1/syntax.rb', line 2853 def items @items end |
#specifier_qualifier_list ⇒ Object (readonly)
Returns the value of attribute specifier_qualifier_list.
2851 2852 2853 |
# File 'lib/adlint/cc1/syntax.rb', line 2851 def specifier_qualifier_list @specifier_qualifier_list end |
#struct_declarators ⇒ Object (readonly)
Returns the value of attribute struct_declarators.
2852 2853 2854 |
# File 'lib/adlint/cc1/syntax.rb', line 2852 def struct_declarators @struct_declarators end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
2863 2864 2865 2866 |
# File 'lib/adlint/cc1/syntax.rb', line 2863 def inspect(indent = 0) ([" " * indent + "#{short_class_name} (#{location.inspect})"] + @items.map { |item| item.inspect(indent + 1) }).join("\n") end |
#location ⇒ Object
2855 2856 2857 |
# File 'lib/adlint/cc1/syntax.rb', line 2855 def location @specifier_qualifier_list.location end |
#to_s ⇒ Object
2859 2860 2861 |
# File 'lib/adlint/cc1/syntax.rb', line 2859 def to_s @items.map { |item| item.to_s + ";" }.join(" ") end |