(p ast.Seq)
| 12 | ) |
| 13 | |
| 14 | func 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 | |
| 28 | func ASTExpr(e ast.Expr) string { |
| 29 | d := &canon{ |