Class: MilkTea::AST::BinaryOp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operator:, left:, right:, line: nil, column: nil) ⇒ BinaryOp

Returns a new instance of BinaryOp.



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

def initialize(operator:, left:, right:, line: nil, column: nil) = super

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



252
253
254
# File 'lib/milk_tea/core/ast.rb', line 252

def column
  @column
end

#leftObject (readonly)

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



252
253
254
# File 'lib/milk_tea/core/ast.rb', line 252

def left
  @left
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



252
253
254
# File 'lib/milk_tea/core/ast.rb', line 252

def line
  @line
end

#operatorObject (readonly)

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



252
253
254
# File 'lib/milk_tea/core/ast.rb', line 252

def operator
  @operator
end

#rightObject (readonly)

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



252
253
254
# File 'lib/milk_tea/core/ast.rb', line 252

def right
  @right
end