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

Method String

cfa/if.go:60–69  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

58// body -> exit
59// }
60func (prim If) String() string {
61 cond, body, exit := label(prim.Cond), label(prim.Body), label(prim.Exit)
62 const format = `
63digraph if {
64 %v -> %v
65 %v -> %v
66 %v -> %v
67}`
68 return fmt.Sprintf(format[1:], cond, body, cond, exit, body, exit)
69}
70
71// FindIf returns the first occurrence of a 1-way conditional statement in g,
72// and a boolean indicating if such a primitive was found.

Callers 12

deadlabelFunction · 0.45
isPkgDotFunction · 0.45
isNameFunction · 0.45
warnFunction · 0.45
usesImportFunction · 0.45
main.goFile · 0.45
processFileFunction · 0.45
gofmtFunction · 0.45
constIntMethod · 0.45
constFloatMethod · 0.45
funcDeclMethod · 0.45
NewFunction · 0.45

Calls 1

labelFunction · 0.70

Tested by

no test coverage detected