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

Method GetMetadata

parser/parser_test.go:2178–2188  ·  view source on GitHub ↗
(elem any)

Source from the content-addressed store, hash-verified

2176}
2177
2178func (l *locationAdorner) GetMetadata(elem any) string {
2179 var elemID int64
2180 switch elem := elem.(type) {
2181 case ast.Expr:
2182 elemID = elem.ID()
2183 case ast.EntryExpr:
2184 elemID = elem.ID()
2185 }
2186 location, _ := l.GetLocation(elemID)
2187 return fmt.Sprintf("^#%d[%d,%d]#", elemID, location.Line(), location.Column())
2188}
2189
2190func convertMacroCallsToString(source *ast.SourceInfo) string {
2191 macroCalls := source.MacroCalls()

Callers

nothing calls this directly

Calls 4

GetLocationMethod · 0.95
IDMethod · 0.65
LineMethod · 0.65
ColumnMethod · 0.65

Tested by

no test coverage detected