Class: AdLint::Cc1::TypeName
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::TypeName
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#abstract_declarator ⇒ Object
readonly
Returns the value of attribute abstract_declarator.
-
#specifier_qualifier_list ⇒ Object
readonly
Returns the value of attribute specifier_qualifier_list.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_declaration ⇒ Object
readonly
Returns the value of attribute type_declaration.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(spec_qual_list, abstract_dcr, sym_tbl) ⇒ TypeName
constructor
A new instance of TypeName.
- #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, abstract_dcr, sym_tbl) ⇒ TypeName
Returns a new instance of TypeName.
4215 4216 4217 4218 4219 4220 4221 |
# File 'lib/adlint/cc1/syntax.rb', line 4215 def initialize(spec_qual_list, abstract_dcr, sym_tbl) super() @specifier_qualifier_list = spec_qual_list @abstract_declarator = abstract_dcr @type = nil @type_declaration = build_type_declaration(spec_qual_list, sym_tbl) end |
Instance Attribute Details
#abstract_declarator ⇒ Object (readonly)
Returns the value of attribute abstract_declarator.
4224 4225 4226 |
# File 'lib/adlint/cc1/syntax.rb', line 4224 def abstract_declarator @abstract_declarator end |
#specifier_qualifier_list ⇒ Object (readonly)
Returns the value of attribute specifier_qualifier_list.
4223 4224 4225 |
# File 'lib/adlint/cc1/syntax.rb', line 4223 def specifier_qualifier_list @specifier_qualifier_list end |
#type ⇒ Object
Returns the value of attribute type.
4225 4226 4227 |
# File 'lib/adlint/cc1/syntax.rb', line 4225 def type @type end |
#type_declaration ⇒ Object (readonly)
Returns the value of attribute type_declaration.
4226 4227 4228 |
# File 'lib/adlint/cc1/syntax.rb', line 4226 def type_declaration @type_declaration end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
4236 4237 4238 |
# File 'lib/adlint/cc1/syntax.rb', line 4236 def inspect(indent = 0) " " * indent + short_class_name + " (#{@type ? @type.image : "nil"})" end |
#location ⇒ Object
4228 4229 4230 |
# File 'lib/adlint/cc1/syntax.rb', line 4228 def location @specifier_qualifier_list.location end |
#to_s ⇒ Object
4232 4233 4234 |
# File 'lib/adlint/cc1/syntax.rb', line 4232 def to_s @type.image end |