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.
4389 4390 4391 4392 4393 |
# File 'lib/adlint/cc1/syntax.rb', line 4389 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.
4395 4396 4397 |
# File 'lib/adlint/cc1/syntax.rb', line 4395 def base @base end |
#parameter_type_list ⇒ Object (readonly)
Returns the value of attribute parameter_type_list.
4396 4397 4398 |
# File 'lib/adlint/cc1/syntax.rb', line 4396 def parameter_type_list @parameter_type_list end |
Instance Method Details
#function?(stack = []) ⇒ Boolean
4402 4403 4404 4405 4406 |
# File 'lib/adlint/cc1/syntax.rb', line 4402 def function?(stack = []) stack.push(:function) @base.function?(stack) if @base stack.last == :function end |
#innermost_parameter_type_list ⇒ Object
4408 4409 4410 |
# File 'lib/adlint/cc1/syntax.rb', line 4408 def innermost_parameter_type_list @base.innermost_parameter_type_list || @parameter_type_list end |
#inspect(indent = 0) ⇒ Object
4412 4413 4414 |
# File 'lib/adlint/cc1/syntax.rb', line 4412 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
4398 4399 4400 |
# File 'lib/adlint/cc1/syntax.rb', line 4398 def location @base ? @base.location || head_location : head_location end |