@@ -63,6 +63,7 @@ added instructions [1, 0, 0, 1, 0, 1] from opcode OpConstant(1)
63
63
added instructions [1, 0, 0, 1, 0, 1, 3] from opcode OpAdd
64
64
added instructions [1, 0, 0, 1, 0, 1, 3, 2] from opcode OpPop
65
65
byte code: Bytecode { instructions: [1, 0, 0, 1, 0, 1, 3, 2], constants: [Int(1), Int(2)] }
66
+ 3
66
67
>> (1 + 2) - (8 - 10)
67
68
Compiling the source: (1 + 2) - (8 - 10)
68
69
[BinaryExpr { op: Minus, lhs: BinaryExpr { op: Plus, lhs: Int(1), rhs: Int(2) }, rhs: BinaryExpr { op: Minus, lhs: Int(8), rhs: Int(10) } }]
@@ -76,6 +77,7 @@ added instructions [1, 0, 0, 1, 0, 1, 3, 1, 0, 2, 1, 0, 3, 4] from opcode OpSub
76
77
added instructions [1, 0, 0, 1, 0, 1, 3, 1, 0, 2, 1, 0, 3, 4, 4] from opcode OpSub
77
78
added instructions [1, 0, 0, 1, 0, 1, 3, 1, 0, 2, 1, 0, 3, 4, 4, 2] from opcode OpPop
78
79
byte code: Bytecode { instructions: [1, 0, 0, 1, 0, 1, 3, 1, 0, 2, 1, 0, 3, 4, 4, 2], constants: [Int(1), Int(2), Int(8), Int(10)] }
80
+ 5
79
81
>>>
80
82
CTRL-C
81
83
```
0 commit comments