Skip to content

Commit 0886a6a

Browse files
authored
remove duplicate codes (#356)
1 parent fb81647 commit 0886a6a

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

expr.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,10 @@ func Compile(input string, ops ...Option) (*vm.Program, error) {
151151
_, _ = checker.Check(tree, config)
152152
ast.Walk(&tree.Node, v)
153153
}
154-
_, err = checker.Check(tree, config)
155-
if err != nil {
156-
return nil, err
157-
}
158-
} else {
159-
_, err = checker.Check(tree, config)
160-
if err != nil {
161-
return nil, err
162-
}
154+
}
155+
_, err = checker.Check(tree, config)
156+
if err != nil {
157+
return nil, err
163158
}
164159

165160
if config.Optimize {

0 commit comments

Comments
 (0)