Class: MilkTea::AST::IfExpr

Inherits:
Data
  • Object
show all
Defined in:
lib/milk_tea/core/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition:, then_expression:, else_expression:, line: nil, column: nil) ⇒ IfExpr

Returns a new instance of IfExpr.



262
# File 'lib/milk_tea/core/ast.rb', line 262

def initialize(condition:, then_expression:, else_expression:, line: nil, column: nil) = super

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



261
262
263
# File 'lib/milk_tea/core/ast.rb', line 261

def column
  @column
end

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



261
262
263
# File 'lib/milk_tea/core/ast.rb', line 261

def condition
  @condition
end

#else_expressionObject (readonly)

Returns the value of attribute else_expression

Returns:

  • (Object)

    the current value of else_expression



261
262
263
# File 'lib/milk_tea/core/ast.rb', line 261

def else_expression
  @else_expression
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



261
262
263
# File 'lib/milk_tea/core/ast.rb', line 261

def line
  @line
end

#then_expressionObject (readonly)

Returns the value of attribute then_expression

Returns:

  • (Object)

    the current value of then_expression



261
262
263
# File 'lib/milk_tea/core/ast.rb', line 261

def then_expression
  @then_expression
end