MCPcopy Index your code
hub / github.com/expr-lang/expr / String

Method String

ast/print.go:259–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257}
258
259func (n *PairNode) String() string {
260 if str, ok := n.Key.(*StringNode); ok {
261 if utils.IsValidIdentifier(str.Value) {
262 return fmt.Sprintf("%s: %s", str.Value, n.Value.String())
263 }
264 return fmt.Sprintf("%s: %s", str.String(), n.Value.String())
265 }
266 return fmt.Sprintf("(%s): %s", n.Key.String(), n.Value.String())
267}

Callers

nothing calls this directly

Calls 3

IsValidIdentifierFunction · 0.92
SprintfMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected