Fixed minor bug in the REPL
This commit is contained in:
parent
81e10ae1ea
commit
f284da7691
|
@ -82,7 +82,6 @@ proc repl(warnings: seq[WarningKind] = @[], mismatches: bool = false, mode: Comp
|
|||
input = editor.read()
|
||||
if input == "#reset":
|
||||
compiled = newChunk()
|
||||
compiler = newBytecodeCompiler(replMode=true)
|
||||
current = ""
|
||||
continue
|
||||
elif input == "#show":
|
||||
|
@ -111,7 +110,7 @@ proc repl(warnings: seq[WarningKind] = @[], mismatches: bool = false, mode: Comp
|
|||
for node in tree:
|
||||
styledEcho fgGreen, "\t", $node
|
||||
echo ""
|
||||
compiled = compiler.compile(tree, "stdin", tokenizer.getLines(), current & input & "\n", showMismatches=mismatches, disabledWarnings=warnings, mode=mode)
|
||||
compiled = newBytecodeCompiler(replMode=true).compile(tree, "stdin", tokenizer.getLines(), current & input & "\n", showMismatches=mismatches, disabledWarnings=warnings, mode=mode)
|
||||
when debugCompiler:
|
||||
styledEcho fgCyan, "Compilation step:\n"
|
||||
debugger.disassembleChunk(compiled, "stdin")
|
||||
|
|
Loading…
Reference in New Issue