MCPcopy
hub / github.com/gopherjs/gopherjs / PrintCond

Method PrintCond

compiler/utils.go:58–64  ·  view source on GitHub ↗
(cond bool, onTrue, onFalse string)

Source from the content-addressed store, hash-verified

56}
57
58func (fc *funcContext) PrintCond(cond bool, onTrue, onFalse string) {
59 if !cond {
60 fc.Printf("/* %s */ %s", strings.ReplaceAll(onTrue, "*/", "<star>/"), onFalse)
61 return
62 }
63 fc.Printf("%s", onTrue)
64}
65
66func (fc *funcContext) SetPos(pos token.Pos) {
67 fc.posAvailable = true

Callers 3

translateStmtMethod · 0.95
translateLoopingStmtMethod · 0.95

Calls 1

PrintfMethod · 0.95

Tested by

no test coverage detected