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.
4283
4284
4285
4286
4287
|
# File 'lib/adlint/cc1/syntax.rb', line 4283
def initialize(abstract_dcr, ptr)
super()
@base = abstract_dcr
@pointer = ptr
end
|
Instance Attribute Details
Returns the value of attribute base.
4289
4290
4291
|
# File 'lib/adlint/cc1/syntax.rb', line 4289
def base
@base
end
|
Instance Method Details
#function?(stack = []) ⇒ Boolean
4295
4296
4297
4298
4299
|
# File 'lib/adlint/cc1/syntax.rb', line 4295
def function?(stack = [])
stack.push(:pointer)
@base.function?(stack) if @base
stack.last == :function
end
|
#identifier_list ⇒ Object
4309
4310
4311
|
# File 'lib/adlint/cc1/syntax.rb', line 4309
def identifier_list
@base.identifier_list
end
|
#innermost_parameter_type_list ⇒ Object
4305
4306
4307
|
# File 'lib/adlint/cc1/syntax.rb', line 4305
def innermost_parameter_type_list
@base.innermost_parameter_type_list
end
|
#inspect(indent = 0) ⇒ Object
4313
4314
4315
|
# File 'lib/adlint/cc1/syntax.rb', line 4313
def inspect(indent = 0)
" " * indent + short_class_name
end
|
4291
4292
4293
|
# File 'lib/adlint/cc1/syntax.rb', line 4291
def location
@base ? @base.location || head_location : head_location
end
|
#parameter_type_list ⇒ Object
4301
4302
4303
|
# File 'lib/adlint/cc1/syntax.rb', line 4301
def parameter_type_list
@base.parameter_type_list
end
|