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

Method parseExpr

parser/pratt_parser.go:456–467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

454}
455
456func (p *prattParserWorker) parseExpr() ast.Expr {
457 if p.recursionLimitExceeded || p.isRecoveryLimitExceeded() {
458 return p.helper.newExpr(common.NoLocation)
459 }
460 if p.checkRecursion(p.recursionDepth + 1) {
461 return p.helper.newExpr(common.NoLocation)
462 }
463 p.recursionDepth++
464 expr := p.parseBinaryAndTernary(0)
465 p.recursionDepth--
466 return expr
467}
468
469// parseElementExpr parses one element of a delimited construct (list, map, struct or argument
470// list), accumulating lastParsedDepth to the deepest element seen so far. A construct is as

Callers 4

parseMethod · 0.95
parseElementExprMethod · 0.95
parseTernaryMethod · 0.95

Calls 4

checkRecursionMethod · 0.95
parseBinaryAndTernaryMethod · 0.95
newExprMethod · 0.45

Tested by

no test coverage detected