Improve code quality
This commit is contained in:
parent
5edad332cd
commit
3f260e7ffd
11 changed files with 95 additions and 45 deletions
10
cli/main.go
10
cli/main.go
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue