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

Function EnableOptionalSyntax

parser/options.go:140–145  ·  view source on GitHub ↗

EnableOptionalSyntax enables syntax for optional field and index selection.

(optionalSyntax bool)

Source from the content-addressed store, hash-verified

138
139// EnableOptionalSyntax enables syntax for optional field and index selection.
140func EnableOptionalSyntax(optionalSyntax bool) Option {
141 return func(opts *options) error {
142 opts.enableOptionalSyntax = optionalSyntax
143 return nil
144 }
145}
146
147// EnableIdentEscapeSyntax enables backtick (`) escaped field identifiers. This
148// supports extended types of characters in identifiers, e.g. foo.`baz-bar`.

Callers 15

TestPruneFunction · 0.92
programFunction · 0.92
TestCheckFunction · 0.92
BenchmarkCheckFunction · 0.92
TestCheckErrorDataFunction · 0.92
enableOptionalSyntaxFunction · 0.92
TestConvertExprFunction · 0.92
TestSourceInfoToProtoFunction · 0.92
mustTypeCheckFunction · 0.92
parser_test.goFile · 0.85

Calls

no outgoing calls

Tested by 12

TestPruneFunction · 0.74
programFunction · 0.74
TestCheckFunction · 0.74
BenchmarkCheckFunction · 0.74
TestCheckErrorDataFunction · 0.74
TestConvertExprFunction · 0.74
TestSourceInfoToProtoFunction · 0.74
mustTypeCheckFunction · 0.74
TestUnparseFunction · 0.68
TestUnparseEscapedCallsFunction · 0.68