Class: MilkTea::AST::IfBranch

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:, body:, line: nil, column: nil, length: nil) ⇒ IfBranch

Returns a new instance of IfBranch.



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

def initialize(condition:, body:, line: nil, column: nil, length: nil) = super

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



144
145
146
# File 'lib/milk_tea/core/ast.rb', line 144

def body
  @body
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



144
145
146
# File 'lib/milk_tea/core/ast.rb', line 144

def column
  @column
end

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



144
145
146
# File 'lib/milk_tea/core/ast.rb', line 144

def condition
  @condition
end

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



144
145
146
# File 'lib/milk_tea/core/ast.rb', line 144

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



144
145
146
# File 'lib/milk_tea/core/ast.rb', line 144

def line
  @line
end