Class: Rubycc::Front::Parser::OrdinaryName

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

Overview

An entry in the ordinary-identifier scope (see @ordinary_scopes). kind is :typedef for a typedef name (value a [resolved Rubycc::Type, const?] pair, the flag carrying a "typedef const int" so a use folds it back into the object's const-ness), :enum for an enumeration constant (value its Integer value), or :ordinary for a variable, parameter or function name (value nil). The ordinary entries carry no payload; they exist only so a declarator can shadow a typedef name or an enum constant of the same name from an outer scope, keeping "typedef int T; { int T; ... }" from misreading the inner T as a type.

Instance Attribute Summary collapse

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



378
379
380
# File 'lib/rubycc/front/parser.rb', line 378

def kind
  @kind
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



378
379
380
# File 'lib/rubycc/front/parser.rb', line 378

def value
  @value
end