MCPcopy
hub / github.com/XiaoMi/Gaea / NodeToStringWithoutQuote

Function NodeToStringWithoutQuote

parser/yy_parser.go:280–286  ·  view source on GitHub ↗

NodeToStringWithoutQuote get node text

(node ast.Node)

Source from the content-addressed store, hash-verified

278
279// NodeToStringWithoutQuote get node text
280func NodeToStringWithoutQuote(node ast.Node) (string, error) {
281 s := &strings.Builder{}
282 if err := node.Restore(pformat.NewRestoreCtx(resultTableNameFlag, s)); err != nil {
283 return "", err
284 }
285 return s.String(), nil
286}

Callers 2

newEmptyResultsetFunction · 0.92
TestNodeToStringFunction · 0.85

Calls 2

RestoreMethod · 0.65
StringMethod · 0.65

Tested by 1

TestNodeToStringFunction · 0.68