Prim returns a representation of the high-level control flow primitive, as a mapping from control flow primitive node names to control flow graph node names. Example mapping: "cond": "A" "body": "B" "exit": "C"
()
| 35 | // "body": "B" |
| 36 | // "exit": "C" |
| 37 | func (prim PreLoop) Prim() *primitive.Primitive { |
| 38 | cond, body, exit := label(prim.Cond), label(prim.Body), label(prim.Exit) |
| 39 | return &primitive.Primitive{ |
| 40 | Prim: "pre_loop", |
| 41 | Nodes: map[string]string{ |
| 42 | "cond": cond, |
| 43 | "body": body, |
| 44 | "exit": exit, |
| 45 | }, |
| 46 | Entry: cond, |
| 47 | Exit: exit, |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // String returns a string representation of prim in DOT format. |
| 52 | // |