MCPcopy Create free account
hub / github.com/cel-expr/cel-go / visitCallIndexInternal

Method visitCallIndexInternal

parser/unparser.go:285–300  ·  view source on GitHub ↗
(expr ast.Expr, op string)

Source from the content-addressed store, hash-verified

283}
284
285func (un *unparser) visitCallIndexInternal(expr ast.Expr, op string) error {
286 c := expr.AsCall()
287 args := c.Args()
288 nested := isBinaryOrTernaryOperator(args[0])
289 err := un.visitMaybeNested(args[0], nested)
290 if err != nil {
291 return err
292 }
293 un.str.WriteString(op)
294 err = un.visit(args[1])
295 if err != nil {
296 return err
297 }
298 un.str.WriteString("]")
299 return nil
300}
301
302func (un *unparser) visitCallUnary(expr ast.Expr) error {
303 c := expr.AsCall()

Callers 2

visitCallIndexMethod · 0.95
visitCallOptIndexMethod · 0.95

Calls 5

visitMaybeNestedMethod · 0.95
visitMethod · 0.95
AsCallMethod · 0.65
ArgsMethod · 0.65

Tested by

no test coverage detected