Skip to content

Commit bd1793c

Browse files
committed
Add backward compatibility with v1
1 parent affb30e commit bd1793c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

expr.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ func Compile(input string, ops ...conf.Option) (*vm.Program, error) {
125125
return program, nil
126126
}
127127

128+
// Parse parses input string to a program.
129+
//
130+
// Deprecated: use expr.Compile instead.
131+
func Parse(input string, ops ...conf.Option) (*vm.Program, error) {
132+
return Compile(input, ops...)
133+
}
134+
128135
// Run evaluates given bytecode program.
129136
func Run(program *vm.Program, env interface{}) (interface{}, error) {
130137
return vm.Run(program, env)

0 commit comments

Comments
 (0)