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

Function EnableOptionalSyntax

parser/options.go:125–130  ·  view source on GitHub ↗

EnableOptionalSyntax enables syntax for optional field and index selection.

(optionalSyntax bool)

Source from the content-addressed store, hash-verified

123
124// EnableOptionalSyntax enables syntax for optional field and index selection.
125func EnableOptionalSyntax(optionalSyntax bool) Option {
126 return func(opts *options) error {
127 opts.enableOptionalSyntax = optionalSyntax
128 return nil
129 }
130}
131
132// EnableIdentEscapeSyntax enables backtick (`) escaped field identifiers. This
133// supports extended types of characters in identifiers, e.g. foo.`baz-bar`.

Callers 12

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
TestUnparseFunction · 0.85

Calls

no outgoing calls

Tested by 10

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