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

Method GetMacroCall

common/ast/ast.go:321–324  ·  view source on GitHub ↗

GetMacroCall returns the original ast.Expr value for the given expression if it was generated via a macro replacement. Note, parsing options must be enabled to track macro calls before this method will return a value.

(id int64)

Source from the content-addressed store, hash-verified

319//
320// Note, parsing options must be enabled to track macro calls before this method will return a value.
321func (s *SourceInfo) GetMacroCall(id int64) (Expr, bool) {
322 e, found := s.MacroCalls()[id]
323 return e, found
324}
325
326// SetMacroCall records a macro call at a specific location.
327func (s *SourceInfo) SetMacroCall(id int64, e Expr) {

Callers 11

visitMaybeMacroCallMethod · 0.80
buildMacroCallArgMethod · 0.80
addMacroCallMethod · 0.80
GetMetadataMethod · 0.80
TestExprHelperCopyFunction · 0.80
normalizeIDsFunction · 0.80
NewBindMacroMethod · 0.80
UpdateExprMethod · 0.80
sanitizeMacroMethod · 0.80
TestSourceInfoNilSafetyFunction · 0.80
TestConvertExprFunction · 0.80

Calls 1

MacroCallsMethod · 0.95

Tested by 4

GetMetadataMethod · 0.64
TestExprHelperCopyFunction · 0.64
TestSourceInfoNilSafetyFunction · 0.64
TestConvertExprFunction · 0.64