From 6fd244cb04cf1972e9d7dcc5635bf5cfe8194402 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 22 Oct 2021 13:38:52 +0200 Subject: Add more keyword token types --- src/bytecode/vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bytecode/vm.h') diff --git a/src/bytecode/vm.h b/src/bytecode/vm.h index cc9f846..6c5dfa7 100644 --- a/src/bytecode/vm.h +++ b/src/bytecode/vm.h @@ -102,8 +102,8 @@ vm_interpret(VM vm) { error_push((Error){ .type = ERR_TYPE_RUNTIME, .value = ERR_NOT_IMPLEMENTED, - .line = vm.chunk->lines[0].line, - .col = vm.chunk->lines[0].col, + .line = vm.chunk->lines[(vm.pc - vm.chunk->code) - 1].line, + .col = vm.chunk->lines[(vm.pc - vm.chunk->code) - 1].col, }); return; } break; -- cgit v1.2.1