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

Method IDs

common/ast/ast.go:166–173  ·  view source on GitHub ↗

IDs returns the set of AST node IDs, including macro calls.

()

Source from the content-addressed store, hash-verified

164
165// IDs returns the set of AST node IDs, including macro calls.
166func (a *AST) IDs() map[int64]bool {
167 visitor := make(idVisitor)
168 PostOrderVisit(a.Expr(), visitor)
169 for _, call := range a.SourceInfo().MacroCalls() {
170 PostOrderVisit(call, visitor)
171 }
172 return visitor
173}
174
175// ClearUnusedIDs removes IDs not used in the AST or macro calls from SourceInfo.
176func (a *AST) ClearUnusedIDs() {

Callers 1

ClearUnusedIDsMethod · 0.95

Calls 4

ExprMethod · 0.95
SourceInfoMethod · 0.95
PostOrderVisitFunction · 0.85
MacroCallsMethod · 0.45

Tested by

no test coverage detected