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

@ -116,7 +116,10 @@ func (cmd *RunCmd) Run(ctx *Context) error {
if ctx.Debug {
log.Println("Compiling parse tree")
}
c.Compile(tree)
err = c.Compile(tree)
if err != nil {
return err
}
chunk = c.Chunk
} else {
@ -219,7 +222,10 @@ func (cmd *CompileCmd) Run(ctx *Context) error {
log.Println("Compiling parse tree")
}
c.Compile(tree)
err = c.Compile(tree)
if err != nil {
return err
}
if ctx.Debug {
log.Println("Registering GOB types")