blob: a7398da4877674f6eaad41c3331c8eb93c8dfd02 [file] [log] [blame]
package cel
func FuzzCompile(data []byte) int {
env, err := NewEnv()
if err != nil {
panic("impossible to create env")
}
ast, issues := env.Compile(string(data))
if issues != nil && issues.Err() != nil {
return 0
}
_, err = env.Program(ast)
if err != nil {
return 0
}
return 1
}