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

Function newTestParser

parser/parser_test.go:3925–3941  ·  view source on GitHub ↗
(t *testing.T, options ...Option)

Source from the content-addressed store, hash-verified

3923}
3924
3925func newTestParser(t *testing.T, options ...Option) *Parser {
3926 t.Helper()
3927 defaultOpts := []Option{
3928 Macros(AllMacros...),
3929 MaxRecursionDepth(32),
3930 ErrorRecoveryLimit(4),
3931 ErrorRecoveryLookaheadTokenLimit(4),
3932 PopulateMacroCalls(true),
3933 }
3934 opts := append([]Option{}, defaultOpts...)
3935 opts = append(opts, options...)
3936 p, err := NewParser(opts...)
3937 if err != nil {
3938 t.Fatalf("NewParser() failed: %v", err)
3939 }
3940 return p
3941}
3942
3943// RelativeSource represents an embedded source element within a larger source.
3944type RelativeSource struct {

Callers 2

TestParseFunction · 0.85
TestParseErrorDataFunction · 0.85

Calls 6

MaxRecursionDepthFunction · 0.85
ErrorRecoveryLimitFunction · 0.85
PopulateMacroCallsFunction · 0.85
MacrosFunction · 0.70
NewParserFunction · 0.70

Tested by

no test coverage detected