Class: Rubycc::Front::Parser::IdentifierList

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/parser.rb

Overview

The identifier list of an old-style (K&R) function declarator — the "(a, b)" of "int add(a, b)", whose parentheses hold parameter names with no types at all (6.7.6.3, identifier-list form). names are the identifier tokens in order and token is the "(" that opened the list, both wanted by the declaration-list checks below.

It rides the very channel a prototype's Parameter array does (the function_params a declarator reports), so it reaches every declarator position a parameter list can — and each of those refuses it (see #reject_identifier_list) except the one 6.7.6.3p3 allows, the definition of that same function.

Instance Attribute Summary collapse

Instance Attribute Details

#namesObject (readonly)

Returns the value of attribute names

Returns:

  • (Object)

    the current value of names



358
359
360
# File 'lib/rubycc/front/parser.rb', line 358

def names
  @names
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



358
359
360
# File 'lib/rubycc/front/parser.rb', line 358

def token
  @token
end