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

Function EnableMacroCallTracking

cel/options.go:1109–1111  ·  view source on GitHub ↗

EnableMacroCallTracking ensures that call expressions which are replaced by macros are tracked in the `SourceInfo` of parsed and checked expressions. This is required for Env.ResidualAst to succeed when the residual Ast contains an unresolved comprehension macro (all, exists, exists_one, filter, ma

()

Source from the content-addressed store, hash-verified

1107// ResidualAst cannot re-serialize the macro's expanded internal representation back
1108// into CEL source syntax and returns an error instead of the residual expression.
1109func EnableMacroCallTracking() EnvOption {
1110 return features(featureEnableMacroCallTracking, true)
1111}
1112
1113// EnableIdentifierEscapeSyntax enables identifier escaping (`) syntax for
1114// fields.

Callers 15

TestCoverageStatsFunction · 0.92
parseAndCompilePolicyFunction · 0.92
compileRuleMethod · 0.92
compileFunction · 0.92
testSetsEnvFunction · 0.92
testEncodersCostsEnvFunction · 0.92
testCompreEnvFunction · 0.92
testMathEnvFunction · 0.92
testMathCostsEnvFunction · 0.92

Calls 1

featuresFunction · 0.85

Tested by 15

TestCoverageStatsFunction · 0.74
parseAndCompilePolicyFunction · 0.74
compileRuleMethod · 0.74
compileFunction · 0.74
testSetsEnvFunction · 0.74
testEncodersCostsEnvFunction · 0.74
testCompreEnvFunction · 0.74
testMathEnvFunction · 0.74
testMathCostsEnvFunction · 0.74
TestInliningOptimizerFunction · 0.74