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

Function NewInterpreter

interpreter/interpreter.go:245–256  ·  view source on GitHub ↗

NewInterpreter builds an Interpreter from a Dispatcher and TypeProvider which will be used throughout the Eval of all Interpretable instances generated from it.

(dispatcher Dispatcher,
	container *containers.Container,
	provider types.Provider,
	adapter types.Adapter,
	attrFactory AttributeFactory)

Source from the content-addressed store, hash-verified

243// NewInterpreter builds an Interpreter from a Dispatcher and TypeProvider which will be used
244// throughout the Eval of all Interpretable instances generated from it.
245func NewInterpreter(dispatcher Dispatcher,
246 container *containers.Container,
247 provider types.Provider,
248 adapter types.Adapter,
249 attrFactory AttributeFactory) Interpreter {
250 return &exprInterpreter{
251 dispatcher: dispatcher,
252 container: container,
253 provider: provider,
254 adapter: adapter,
255 attrFactory: attrFactory}
256}
257
258// NewInterpretable implements the Interpreter interface method.
259func (i *exprInterpreter) NewInterpretable(

Callers 5

newProgramFunction · 0.92
TestPruneFunction · 0.85
programFunction · 0.85
newStandardInterpreterFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestPruneFunction · 0.68
programFunction · 0.68
newStandardInterpreterFunction · 0.68