String returns a string representation of prim in DOT format. Example output: digraph post_loop { cond -> cond cond -> exit }
()
| 52 | // cond -> exit |
| 53 | // } |
| 54 | func (prim PostLoop) String() string { |
| 55 | cond, exit := label(prim.Cond), label(prim.Exit) |
| 56 | const format = ` |
| 57 | digraph post_loop { |
| 58 | %v -> %v |
| 59 | %v -> %v |
| 60 | }` |
| 61 | return fmt.Sprintf(format[1:], cond, cond, cond, exit) |
| 62 | } |
| 63 | |
| 64 | // FindPostLoop returns the first occurrence of a post-test loop in g, and a |
| 65 | // boolean indicating if such a primitive was found. |