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.
3157
3158
3159
3160
|
# File 'lib/adlint/cc1/syntax.rb', line 3157
def initialize(base_dcr)
super()
@base = base_dcr
end
|
Instance Attribute Details
Returns the value of attribute base.
3162
3163
3164
|
# File 'lib/adlint/cc1/syntax.rb', line 3162
def base
@base
end
|
Instance Method Details
#function?(stack = []) ⇒ Boolean
3184
3185
3186
3187
3188
|
# File 'lib/adlint/cc1/syntax.rb', line 3184
def function?(stack = [])
stack.push(:pointer) if pointer
@base.function?(stack)
stack.last == :function
end
|
#identifier ⇒ Object
3168
3169
3170
|
# File 'lib/adlint/cc1/syntax.rb', line 3168
def identifier
@base.identifier
end
|
#identifier_list ⇒ Object
3180
3181
3182
|
# File 'lib/adlint/cc1/syntax.rb', line 3180
def identifier_list
@base.identifier_list
end
|
#innermost_parameter_type_list ⇒ Object
3176
3177
3178
|
# File 'lib/adlint/cc1/syntax.rb', line 3176
def innermost_parameter_type_list
@base.innermost_parameter_type_list
end
|
#inspect(indent = 0) ⇒ Object
3190
3191
3192
|
# File 'lib/adlint/cc1/syntax.rb', line 3190
def inspect(indent = 0)
" " * indent + "#{short_class_name}\n" + @base.inspect(indent + 1)
end
|
3164
3165
3166
|
# File 'lib/adlint/cc1/syntax.rb', line 3164
def location
@base ? @base.location || head_location : head_location
end
|
#parameter_type_list ⇒ Object
3172
3173
3174
|
# File 'lib/adlint/cc1/syntax.rb', line 3172
def parameter_type_list
@base.parameter_type_list
end
|