Class: AdLint::Cc1::IdentifierDeclarator

Inherits:
Declarator show all
Defined in:
lib/adlint/cc1/syntax.rb

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

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(id) ⇒ IdentifierDeclarator

Returns a new instance of IdentifierDeclarator.



3119
3120
3121
3122
# File 'lib/adlint/cc1/syntax.rb', line 3119

def initialize(id)
  super()
  @identifier = id
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



3124
3125
3126
# File 'lib/adlint/cc1/syntax.rb', line 3124

def identifier
  @identifier
end

Instance Method Details

#baseObject



3130
3131
3132
# File 'lib/adlint/cc1/syntax.rb', line 3130

def base
  nil
end

#function?(stack = []) ⇒ Boolean

Returns:

  • (Boolean)


3146
3147
3148
3149
# File 'lib/adlint/cc1/syntax.rb', line 3146

def function?(stack = [])
  stack.push(:pointer) if pointer
  stack.last == :function
end

#identifier_listObject



3142
3143
3144
# File 'lib/adlint/cc1/syntax.rb', line 3142

def identifier_list
  nil
end

#innermost_parameter_type_listObject



3138
3139
3140
# File 'lib/adlint/cc1/syntax.rb', line 3138

def innermost_parameter_type_list
  nil
end

#inspect(indent = 0) ⇒ Object



3151
3152
3153
# File 'lib/adlint/cc1/syntax.rb', line 3151

def inspect(indent = 0)
  " " * indent + "#{short_class_name} #{@identifier.value}"
end

#locationObject



3126
3127
3128
# File 'lib/adlint/cc1/syntax.rb', line 3126

def location
  @identifier.location
end

#parameter_type_listObject



3134
3135
3136
# File 'lib/adlint/cc1/syntax.rb', line 3134

def parameter_type_list
  nil
end