Class: AdLint::Cc1::ArrayAbstractDeclarator
- Inherits:
-
AbstractDeclarator
- Object
- SyntaxNode
- Declarator
- AbstractDeclarator
- AdLint::Cc1::ArrayAbstractDeclarator
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#size_expression ⇒ Object
readonly
Returns the value of attribute size_expression.
Attributes inherited from Declarator
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #function?(stack = []) ⇒ Boolean
- #identifier_list ⇒ Object
-
#initialize(abstract_dcr, size_expr) ⇒ ArrayAbstractDeclarator
constructor
A new instance of ArrayAbstractDeclarator.
- #innermost_parameter_type_list ⇒ Object
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
- #parameter_type_list ⇒ Object
Methods inherited from AbstractDeclarator
Methods inherited from Declarator
#abstract?, #full=, #full?, #identifier, #variable?
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(abstract_dcr, size_expr) ⇒ ArrayAbstractDeclarator
Returns a new instance of ArrayAbstractDeclarator.
4352 4353 4354 4355 4356 |
# File 'lib/adlint/cc1/syntax.rb', line 4352 def initialize(abstract_dcr, size_expr) super() @base = abstract_dcr @size_expression = size_expr end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
4358 4359 4360 |
# File 'lib/adlint/cc1/syntax.rb', line 4358 def base @base end |
#size_expression ⇒ Object (readonly)
Returns the value of attribute size_expression.
4359 4360 4361 |
# File 'lib/adlint/cc1/syntax.rb', line 4359 def size_expression @size_expression end |
Instance Method Details
#function?(stack = []) ⇒ Boolean
4365 4366 4367 4368 4369 |
# File 'lib/adlint/cc1/syntax.rb', line 4365 def function?(stack = []) stack.push(:array) @base.function?(stack) if @base stack.last == :function end |
#identifier_list ⇒ Object
4379 4380 4381 |
# File 'lib/adlint/cc1/syntax.rb', line 4379 def identifier_list @base.identifier_list end |
#innermost_parameter_type_list ⇒ Object
4375 4376 4377 |
# File 'lib/adlint/cc1/syntax.rb', line 4375 def innermost_parameter_type_list @base.innermost_parameter_type_list end |
#inspect(indent = 0) ⇒ Object
4383 4384 4385 |
# File 'lib/adlint/cc1/syntax.rb', line 4383 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
4361 4362 4363 |
# File 'lib/adlint/cc1/syntax.rb', line 4361 def location @base ? @base.location || head_location : head_location end |
#parameter_type_list ⇒ Object
4371 4372 4373 |
# File 'lib/adlint/cc1/syntax.rb', line 4371 def parameter_type_list @base.parameter_type_list end |