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

Method GetMetadata

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

Source from the content-addressed store, hash-verified

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