(c *checker.Checker, sf *ast.SourceFile, node typeparser.ExecutionNode)
| 410 | } |
| 411 | |
| 412 | func formatExecutionFlowNodeLabel(c *checker.Checker, sf *ast.SourceFile, node typeparser.ExecutionNode) string { |
| 413 | var lines []string |
| 414 | switch node.Kind { |
| 415 | case typeparser.ExecutionNodeKindValue: |
| 416 | lines = append(lines, "type: "+formatExecutionType(c, node.Type)) |
| 417 | lines = append(lines, "node: "+formatExecutionSourceNode(sf, node.Node)) |
| 418 | return strings.Join(lines, "\n") |
| 419 | case typeparser.ExecutionNodeKindLogicMerge: |
| 420 | lines = append(lines, "type: "+formatExecutionType(c, node.Type)) |
| 421 | lines = append(lines, "node: "+formatExecutionSourceNode(sf, node.Node)) |
| 422 | return strings.Join(lines, "\n") |
| 423 | case typeparser.ExecutionNodeKindFunction: |
| 424 | lines = append(lines, "type: "+formatExecutionType(c, node.Type)) |
| 425 | lines = append(lines, "node: "+formatExecutionSourceNode(sf, node.Node)) |
| 426 | return strings.Join(lines, "\n") |
| 427 | default: |
| 428 | lines = append(lines, "type: "+formatExecutionType(c, node.Type)) |
| 429 | lines = append(lines, "callee: "+formatExecutionSourceNode(sf, node.Callee)) |
| 430 | } |
| 431 | |
| 432 | args := "[]" |
| 433 | if len(node.Args) > 0 { |
| 434 | parts := make([]string, 0, len(node.Args)) |
| 435 | for _, arg := range node.Args { |
| 436 | parts = append(parts, formatExecutionSourceNode(sf, arg)) |
| 437 | } |
| 438 | args = "[" + strings.Join(parts, ", ") + "]" |
| 439 | } |
| 440 | lines = append(lines, "args: "+args) |
| 441 | return strings.Join(lines, "\n") |
| 442 | } |
| 443 | |
| 444 | func formatExecutionFlowEdgeLabel(_ *ast.SourceFile, edge typeparser.ExecutionLink) string { |
| 445 | var lines []string |
no test coverage detected