Improve code quality

This commit is contained in:
Neemek 2025-03-16 21:16:12 +01:00
parent 5edad332cd
commit 3f260e7ffd
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
11 changed files with 95 additions and 45 deletions

View file

@ -78,7 +78,10 @@ func TestAll(t *testing.T) {
c := NewCompiler()
t.Log("Compiling parse tree")
c.Compile(tree)
err = c.Compile(tree)
if err != nil {
t.Fatalf("Compiler had an error: %s", err)
}
printChunk(t, name, c.Chunk)
@ -108,7 +111,7 @@ func BenchmarkAll(b *testing.B) {
tree, _ := p.Parse()
c := NewCompiler()
c.Compile(tree)
_ = c.Compile(tree)
vm := NewVM(c.Chunk, 256, 256)