Skip to content

Commit

Permalink
remove duplicate codes (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneizelw authored Apr 18, 2023
1 parent fb81647 commit 0886a6a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,10 @@ func Compile(input string, ops ...Option) (*vm.Program, error) {
_, _ = checker.Check(tree, config)
ast.Walk(&tree.Node, v)
}
_, err = checker.Check(tree, config)
if err != nil {
return nil, err
}
} else {
_, err = checker.Check(tree, config)
if err != nil {
return nil, err
}
}
_, err = checker.Check(tree, config)
if err != nil {
return nil, err
}

if config.Optimize {
Expand Down

0 comments on commit 0886a6a

Please sign in to comment.