Class: AdLint::Cc1::GroupedDeclarator
Instance Attribute Summary collapse
Attributes inherited from Declarator
#pointer
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary
collapse
Methods inherited from Declarator
#abstract?, #full=, #full?, #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 GroupedDeclarator.
3176
3177
3178
3179
|
# File 'lib/adlint/cc1/syntax.rb', line 3176
def initialize(base_dcr)
super()
@base = base_dcr
end
|
Instance Attribute Details
Returns the value of attribute base.
3181
3182
3183
|
# File 'lib/adlint/cc1/syntax.rb', line 3181
def base
@base
end
|
Instance Method Details
#function?(stack = []) ⇒ Boolean
3203
3204
3205
3206
3207
|
# File 'lib/adlint/cc1/syntax.rb', line 3203
def function?(stack = [])
stack.push(:pointer) if pointer
@base.function?(stack)
stack.last == :function
end
|
#identifier ⇒ Object
3187
3188
3189
|
# File 'lib/adlint/cc1/syntax.rb', line 3187
def identifier
@base.identifier
end
|
#identifier_list ⇒ Object
3199
3200
3201
|
# File 'lib/adlint/cc1/syntax.rb', line 3199
def identifier_list
@base.identifier_list
end
|
#innermost_parameter_type_list ⇒ Object
3195
3196
3197
|
# File 'lib/adlint/cc1/syntax.rb', line 3195
def innermost_parameter_type_list
@base.innermost_parameter_type_list
end
|
#inspect(indent = 0) ⇒ Object
3209
3210
3211
|
# File 'lib/adlint/cc1/syntax.rb', line 3209
def inspect(indent = 0)
" " * indent + "#{short_class_name}\n" + @base.inspect(indent + 1)
end
|
3183
3184
3185
|
# File 'lib/adlint/cc1/syntax.rb', line 3183
def location
@base ? @base.location || head_location : head_location
end
|
#parameter_type_list ⇒ Object
3191
3192
3193
|
# File 'lib/adlint/cc1/syntax.rb', line 3191
def parameter_type_list
@base.parameter_type_list
end
|