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

Method visitMaybeNested

parser/unparser.go:496–508  ·  view source on GitHub ↗
(expr ast.Expr, nested bool)

Source from the content-addressed store, hash-verified

494}
495
496func (un *unparser) visitMaybeNested(expr ast.Expr, nested bool) error {
497 if nested {
498 un.str.WriteString("(")
499 }
500 err := un.visit(expr)
501 if err != nil {
502 return err
503 }
504 if nested {
505 un.str.WriteString(")")
506 }
507 return nil
508}
509
510// isLeftRecursive indicates whether the parser resolves the call in a left-recursive manner as
511// this can have an effect of how parentheses affect the order of operations in the AST.

Callers 6

visitCallBinaryMethod · 0.95
visitCallConditionalMethod · 0.95
visitCallFuncMethod · 0.95
visitCallUnaryMethod · 0.95
visitSelectInternalMethod · 0.95

Calls 1

visitMethod · 0.95

Tested by

no test coverage detected