It is now possible to test the serializer on arbitrary bytecode files

This commit is contained in:
Mattia Giambirtone 2023-07-22 16:19:52 +02:00
parent 68a6e2e83b
commit 5fa463d9b4
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ proc runFile(f: string, fromString: bool = false, dump: bool = true, breakpoints
stderr.styledWriteLine(fgRed, styleBright, "Error: ", fgDefault, "the selected backend is not implemented yet")
elif backend == PeonBackend.Bytecode:
serialized = serializer.loadFile(f)
compiled = serialized.chunk
if debugCompiler:
styledEcho fgCyan, "Compilation step:\n"
debugger.disassembleChunk(serialized.chunk, f)