MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / parseStmt

Function parseStmt

pkg/sql/colexec/execgen/util.go:52–62  ·  view source on GitHub ↗
(stmt string)

Source from the content-addressed store, hash-verified

50}
51
52func parseStmt(stmt string) (dst.Stmt, error) {
53 f, err := decorator.Parse(fmt.Sprintf(
54 `package main
55func test() {
56 %s
57}`, stmt))
58 if err != nil {
59 return nil, err
60 }
61 return f.Decls[0].(*dst.FuncDecl).Body.List[0], nil
62}
63
64func mustParseStmt(stmt string) dst.Stmt {
65 ret, err := parseStmt(stmt)

Callers 1

mustParseStmtFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…