aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode/compiler.h')
-rwxr-xr-xsrc/bytecode/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bytecode/compiler.h b/src/bytecode/compiler.h
index 8f3fa81..47e7859 100755
--- a/src/bytecode/compiler.h
+++ b/src/bytecode/compiler.h
@@ -90,6 +90,9 @@ compile_list_binary_op(Chunk *chunk, Visitor *vs, Token start, Ops op) {
90 break; 90 break;
91 } 91 }
92 parse_tree(chunk, vs); 92 parse_tree(chunk, vs);
93 if (tok.type == TOKEN_SYMBOL) {
94 add_code(chunk, OP_GET_GLOBAL, tok.line, tok.column);
95 }
93 n++; 96 n++;
94 } 97 }
95 emit_constant(chunk, start, FIXNUM_VAL(n)); 98 emit_constant(chunk, start, FIXNUM_VAL(n));
@@ -123,6 +126,9 @@ compile_list_unary_op(Chunk *chunk, Visitor *vs, Token start, Ops op) {
123 return; 126 return;
124 } 127 }
125 parse_tree(chunk, vs); 128 parse_tree(chunk, vs);
129 if (tok.type == TOKEN_SYMBOL) {
130 add_code(chunk, OP_GET_GLOBAL, tok.line, tok.column);
131 }
126 add_code(chunk, op, start.line, start.column); 132 add_code(chunk, op, start.line, start.column);
127 n++; 133 n++;
128 if (n > 1) { 134 if (n > 1) {