Class: AdLint::Cc1::FunctionAbstractDeclarator
- Inherits:
-
AbstractDeclarator
- Object
- SyntaxNode
- Declarator
- AbstractDeclarator
- AdLint::Cc1::FunctionAbstractDeclarator
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#parameter_type_list ⇒ Object
readonly
Returns the value of attribute parameter_type_list.
Attributes inherited from Declarator
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #function?(stack = []) ⇒ Boolean
-
#initialize(abstract_dcr, param_type_list) ⇒ FunctionAbstractDeclarator
constructor
A new instance of FunctionAbstractDeclarator.
- #innermost_parameter_type_list ⇒ Object
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from AbstractDeclarator
Methods inherited from Declarator
#abstract?, #full=, #full?, #identifier, #identifier_list, #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, param_type_list) ⇒ FunctionAbstractDeclarator
Returns a new instance of FunctionAbstractDeclarator.
4370 4371 4372 4373 4374 |
# File 'lib/adlint/cc1/syntax.rb', line 4370 def initialize(abstract_dcr, param_type_list) super() @base = abstract_dcr @parameter_type_list = param_type_list end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
4376 4377 4378 |
# File 'lib/adlint/cc1/syntax.rb', line 4376 def base @base end |
#parameter_type_list ⇒ Object (readonly)
Returns the value of attribute parameter_type_list.
4377 4378 4379 |
# File 'lib/adlint/cc1/syntax.rb', line 4377 def parameter_type_list @parameter_type_list end |
Instance Method Details
#function?(stack = []) ⇒ Boolean
4383 4384 4385 4386 4387 |
# File 'lib/adlint/cc1/syntax.rb', line 4383 def function?(stack = []) stack.push(:function) @base.function?(stack) if @base stack.last == :function end |
#innermost_parameter_type_list ⇒ Object
4389 4390 4391 |
# File 'lib/adlint/cc1/syntax.rb', line 4389 def innermost_parameter_type_list @base.innermost_parameter_type_list || @parameter_type_list end |
#inspect(indent = 0) ⇒ Object
4393 4394 4395 |
# File 'lib/adlint/cc1/syntax.rb', line 4393 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
4379 4380 4381 |
# File 'lib/adlint/cc1/syntax.rb', line 4379 def location @base ? @base.location || head_location : head_location end |