Class: AdLint::Cc1::PointerAbstractDeclarator
Instance Attribute Summary collapse
Attributes inherited from Declarator
#pointer
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary
collapse
#abstract?, #identifier
Methods inherited from Declarator
#abstract?, #full=, #full?, #identifier, #variable?
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
#analysis_target?
Methods included from Visitable
#accept
Constructor Details
Returns a new instance of PointerAbstractDeclarator.
4264
4265
4266
4267
4268
|
# File 'lib/adlint/cc1/syntax.rb', line 4264
def initialize(abstract_dcr, ptr)
super()
@base = abstract_dcr
@pointer = ptr
end
|
Instance Attribute Details
Returns the value of attribute base.
4270
4271
4272
|
# File 'lib/adlint/cc1/syntax.rb', line 4270
def base
@base
end
|
Instance Method Details
#function?(stack = []) ⇒ Boolean
4276
4277
4278
4279
4280
|
# File 'lib/adlint/cc1/syntax.rb', line 4276
def function?(stack = [])
stack.push(:pointer)
@base.function?(stack) if @base
stack.last == :function
end
|
#identifier_list ⇒ Object
4290
4291
4292
|
# File 'lib/adlint/cc1/syntax.rb', line 4290
def identifier_list
@base.identifier_list
end
|
#innermost_parameter_type_list ⇒ Object
4286
4287
4288
|
# File 'lib/adlint/cc1/syntax.rb', line 4286
def innermost_parameter_type_list
@base.innermost_parameter_type_list
end
|
#inspect(indent = 0) ⇒ Object
4294
4295
4296
|
# File 'lib/adlint/cc1/syntax.rb', line 4294
def inspect(indent = 0)
" " * indent + short_class_name
end
|
4272
4273
4274
|
# File 'lib/adlint/cc1/syntax.rb', line 4272
def location
@base ? @base.location || head_location : head_location
end
|
#parameter_type_list ⇒ Object
4282
4283
4284
|
# File 'lib/adlint/cc1/syntax.rb', line 4282
def parameter_type_list
@base.parameter_type_list
end
|