Class: Rubycc::Front::AST::Switch

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

Overview

switch (control) body (ISO C 6.8.4.2). control is the controlling expression (an integer type). body is a single statement — usually a compound-statement — inside which case/default labels mark the entry points the generator lowers to a comparison chain. A case label may sit at any depth of a nested statement in body; the ones that belong to this switch are exactly those not enclosed by a nested switch.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



286
287
288
# File 'lib/rubycc/front/ast.rb', line 286

def body
  @body
end

#controlObject (readonly)

Returns the value of attribute control

Returns:

  • (Object)

    the current value of control



286
287
288
# File 'lib/rubycc/front/ast.rb', line 286

def control
  @control
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



286
287
288
# File 'lib/rubycc/front/ast.rb', line 286

def token
  @token
end