MCPcopy Create free account
hub / github.com/brimdata/super / AST

Function AST

compiler/sfmt/ast.go:14–26  ·  view source on GitHub ↗
(p ast.Seq)

Source from the content-addressed store, hash-verified

12)
13
14func AST(p ast.Seq) string {
15 if len(p) == 0 {
16 return ""
17 }
18 c := &canon{shared: shared{formatter{tab: 2}}, head: true, first: true}
19 if scope, ok := p[0].(*ast.ScopeOp); ok {
20 c.scope(scope, false)
21 } else {
22 c.seq(p)
23 }
24 c.flush()
25 return c.String()
26}
27
28func ASTExpr(e ast.Expr) string {
29 d := &canon{

Callers 2

RunMethod · 0.92
RunMethod · 0.92

Calls 4

scopeMethod · 0.95
seqMethod · 0.95
StringMethod · 0.65
flushMethod · 0.45

Tested by

no test coverage detected