Class: Rubycc::Front::AST::If

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

Overview

if (condition) then_stmt with an optional else else_stmt. else_stmt is nil when there is no else clause.

Instance Attribute Summary collapse

Instance Attribute Details

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



245
246
247
# File 'lib/rubycc/front/ast.rb', line 245

def condition
  @condition
end

#else_stmtObject (readonly)

Returns the value of attribute else_stmt

Returns:

  • (Object)

    the current value of else_stmt



245
246
247
# File 'lib/rubycc/front/ast.rb', line 245

def else_stmt
  @else_stmt
end

#then_stmtObject (readonly)

Returns the value of attribute then_stmt

Returns:

  • (Object)

    the current value of then_stmt



245
246
247
# File 'lib/rubycc/front/ast.rb', line 245

def then_stmt
  @then_stmt
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



245
246
247
# File 'lib/rubycc/front/ast.rb', line 245

def token
  @token
end