MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / NodeString

Function NodeString

syntax/printer.go:49–56  ·  view source on GitHub ↗

NodeString is a convenience function that prints n in ShortForm and returns the printed string.

(n Node)

Source from the content-addressed store, hash-verified

47// NodeString is a convenience function that prints n in ShortForm
48// and returns the printed string.
49func NodeString(n Node) string {
50 var buf bytes.Buffer
51 _, err := Fprint(&buf, n, ShortForm)
52 if err != nil {
53 fmt.Fprintf(&buf, "<<< ERROR: %s", err)
54 }
55 return buf.String()
56}
57
58type ctrlSymbol int
59

Callers 12

unaryExprMethod · 0.85
headerMethod · 0.85
blockBranchesMethod · 0.85
TestPrintStringFunction · 0.85
TestShortStringFunction · 0.85
operandStringFunction · 0.85
assignVarMethod · 0.85
TestValuesInfoFunction · 0.85
TestTypesInfoFunction · 0.85
TestPredicatesInfoFunction · 0.85
testBuiltinSignatureFunction · 0.85
sprintfFunction · 0.85

Calls 2

StringMethod · 0.95
FprintFunction · 0.85

Tested by 6

TestPrintStringFunction · 0.68
TestShortStringFunction · 0.68
TestValuesInfoFunction · 0.68
TestTypesInfoFunction · 0.68
TestPredicatesInfoFunction · 0.68
testBuiltinSignatureFunction · 0.68