(funcName string, o *OverloadDecl)
| 1208 | } |
| 1209 | |
| 1210 | func formatCall(funcName string, o *OverloadDecl) string { |
| 1211 | args := make([]string, len(o.ArgTypes())) |
| 1212 | ret := describeCELType(o.ResultType()) |
| 1213 | for j, a := range o.ArgTypes() { |
| 1214 | args[j] = describeCELType(a) |
| 1215 | } |
| 1216 | if o.IsMemberFunction() { |
| 1217 | target := args[0] |
| 1218 | args = args[1:] |
| 1219 | return fmt.Sprintf("%s.%s(%s) -> %s", target, funcName, strings.Join(args, ", "), ret) |
| 1220 | } |
| 1221 | return fmt.Sprintf("%s(%s) -> %s", funcName, strings.Join(args, ", "), ret) |
| 1222 | } |
| 1223 | |
| 1224 | func describeCELType(t *types.Type) string { |
| 1225 | if t.Kind() == types.TypeKind { |
no test coverage detected