(p *PrettyCfg)
| 356 | } |
| 357 | |
| 358 | func (node *OrExpr) doc(p *PrettyCfg) pretty.Doc { |
| 359 | pred := func(e Expr, recurse func(e Expr)) bool { |
| 360 | if a, ok := e.(*OrExpr); ok { |
| 361 | recurse(a.Left) |
| 362 | recurse(a.Right) |
| 363 | return true |
| 364 | } |
| 365 | return false |
| 366 | } |
| 367 | formatOperand := func(e Expr) pretty.Doc { |
| 368 | return p.Doc(p.peelAndOrOperand(e)) |
| 369 | } |
| 370 | operands := p.flattenOp(node.Left, pred, formatOperand, nil) |
| 371 | operands = p.flattenOp(node.Right, pred, formatOperand, operands) |
| 372 | return p.joinNestedOuter("OR", operands...) |
| 373 | } |
| 374 | |
| 375 | func (node *Exprs) doc(p *PrettyCfg) pretty.Doc { |
| 376 | if node == nil || len(*node) == 0 { |
nothing calls this directly
no test coverage detected