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.



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

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



130
131
132
# File 'lib/milk_tea/core/ast.rb', line 130

def body
  @body
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



130
131
132
# File 'lib/milk_tea/core/ast.rb', line 130

def column
  @column
end

#conditionObject (readonly)

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



130
131
132
# File 'lib/milk_tea/core/ast.rb', line 130

def condition
  @condition
end

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



130
131
132
# File 'lib/milk_tea/core/ast.rb', line 130

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



130
131
132
# File 'lib/milk_tea/core/ast.rb', line 130

def line
  @line
end