class AdLint::Cc1::ParameterDefinition

Attributes

declarator[R]

Public Class Methods

new(dcl_specs, dcr) click to toggle source
Calls superclass method AdLint::Cc1::Definition::new
# File lib/adlint/cc1/syntax.rb, line 4181
def initialize(dcl_specs, dcr)
  super(dcl_specs)
  @declarator = dcr
end

Public Instance Methods

identifier() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4188
def identifier
  if @declarator
    if @declarator.abstract?
      nil
    else
      @declarator.identifier
    end
  else
    nil
  end
end
inspect(indent = 0) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4217
def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{location.inspect}) " +
    (storage_class_specifier ? storage_class_specifier.inspect : "") +
    (identifier ? identifier.value : "")
end
location() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4200
def location
  case
  when identifier
    identifier.location
  when declaration_specifiers
    declaration_specifiers.location
  else
    Location.new
  end
end
to_variable_definition() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4211
def to_variable_definition
  PseudoVariableDefinition.new(declaration_specifiers,
                               InitDeclarator.new(@declarator, nil, nil),
                               type)
end