Class: MilkTea::AST::UnaryOp

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:, operand:, line: nil, column: nil) ⇒ UnaryOp

Returns a new instance of UnaryOp.



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

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

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



249
250
251
# File 'lib/milk_tea/core/ast.rb', line 249

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



249
250
251
# File 'lib/milk_tea/core/ast.rb', line 249

def line
  @line
end

#operandObject (readonly)

Returns the value of attribute operand

Returns:

  • (Object)

    the current value of operand



249
250
251
# File 'lib/milk_tea/core/ast.rb', line 249

def operand
  @operand
end

#operatorObject (readonly)

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



249
250
251
# File 'lib/milk_tea/core/ast.rb', line 249

def operator
  @operator
end