(funcName string, o *OverloadDecl)
| 1112 | } |
| 1113 | |
| 1114 | func formatCall(funcName string, o *OverloadDecl) string { |
| 1115 | args := make([]string, len(o.ArgTypes())) |
| 1116 | ret := describeCELType(o.ResultType()) |
| 1117 | for j, a := range o.ArgTypes() { |
| 1118 | args[j] = describeCELType(a) |
| 1119 | } |
| 1120 | if o.IsMemberFunction() { |
| 1121 | target := args[0] |
| 1122 | args = args[1:] |
| 1123 | return fmt.Sprintf("%s.%s(%s) -> %s", target, funcName, strings.Join(args, ", "), ret) |
| 1124 | } |
| 1125 | return fmt.Sprintf("%s(%s) -> %s", funcName, strings.Join(args, ", "), ret) |
| 1126 | } |
| 1127 | |
| 1128 | func describeCELType(t *types.Type) string { |
| 1129 | if t.Kind() == types.TypeKind { |
no test coverage detected