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

Method GetMetadata

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

Source from the content-addressed store, hash-verified

2749}
2750
2751func (l *locationAdorner) GetMetadata(elem any) string {
2752 var elemID int64
2753 switch elem := elem.(type) {
2754 case ast.Expr:
2755 elemID = elem.ID()
2756 case ast.EntryExpr:
2757 elemID = elem.ID()
2758 }
2759 location, _ := l.GetLocation(elemID)
2760 return fmt.Sprintf("^#%d[%d,%d]#", elemID, location.Line(), location.Column())
2761}
2762
2763func convertMacroCallsToString(source *ast.SourceInfo) string {
2764 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