Class: Rubycc::Front::AST::Conditional

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

Overview

The conditional operator "condition ? then_expr : else_expr". condition must be int-typed; then_expr and else_expr must share the same type (int/int or same-type pointer/pointer).

Instance Attribute Summary collapse

Instance Attribute Details

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



55
56
57
# File 'lib/rubycc/front/ast.rb', line 55

def condition
  @condition
end

#else_exprObject (readonly)

Returns the value of attribute else_expr

Returns:

  • (Object)

    the current value of else_expr



55
56
57
# File 'lib/rubycc/front/ast.rb', line 55

def else_expr
  @else_expr
end

#then_exprObject (readonly)

Returns the value of attribute then_expr

Returns:

  • (Object)

    the current value of then_expr



55
56
57
# File 'lib/rubycc/front/ast.rb', line 55

def then_expr
  @then_expr
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



55
56
57
# File 'lib/rubycc/front/ast.rb', line 55

def token
  @token
end