MCPcopy Create free account
hub / github.com/decomp/decomp / String

Method String

cfa/if_else.go:67–77  ·  view source on GitHub ↗

String returns a string representation of prim in DOT format. Example output: digraph if_else { cond -> body_true cond -> body_false body_true -> exit body_false -> exit }

()

Source from the content-addressed store, hash-verified

65// body_false -> exit
66// }
67func (prim IfElse) String() string {
68 cond, bodyTrue, bodyFalse, exit := label(prim.Cond), label(prim.BodyTrue), label(prim.BodyFalse), label(prim.Exit)
69 const format = `
70digraph if_else {
71 %v -> %v
72 %v -> %v
73 %v -> %v
74 %v -> %v
75}`
76 return fmt.Sprintf(format[1:], cond, bodyTrue, cond, bodyFalse, bodyTrue, exit, bodyFalse, exit)
77}
78
79// FindIfElse returns the first occurrence of a 2-way conditional statement in
80// g, and a boolean indicating if such a primitive was found.

Callers

nothing calls this directly

Calls 1

labelFunction · 0.70

Tested by

no test coverage detected