Class: Rubycc::Front::Parser::EnumTag

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

Overview

A tag scope entry for an enum tag. C keeps struct, union and enum tags in one shared namespace, so enum tags live in @tag_scopes alongside the StructType objects that stand for struct tags. An enum contributes no distinct type — an enum object is just an int (6.7.2.2) — so this marker only records that the tag names an enum, which lets a later "struct X" (or "enum X" against a struct tag) be diagnosed as the wrong kind of tag.

Instance Attribute Summary collapse

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



366
367
368
# File 'lib/rubycc/front/parser.rb', line 366

def tag
  @tag
end