StackMachine::Operation
Inherits Enum < Comparable < Value < Object
Enum for every binary mathematical operaiton. TODO: Figure out a scheme for unary operations.
Constants
Add = 0
Sub = 1
Mul = 2
Div = 3
Instance methods
call(l : Float64, r : Float64) : Float64
This method performs the mathematical operation represented by the enum. It will always return an Int32 and truncate on division.
StackMachine::Operation::Add.call(1, 2) # => 3
StackMachine::Operation::Div.call(1, 2) # => 0