(expr ast.Expr, nested bool)
| 494 | } |
| 495 | |
| 496 | func (un *unparser) visitMaybeNested(expr ast.Expr, nested bool) error { |
| 497 | if nested { |
| 498 | un.str.WriteString("(") |
| 499 | } |
| 500 | err := un.visit(expr) |
| 501 | if err != nil { |
| 502 | return err |
| 503 | } |
| 504 | if nested { |
| 505 | un.str.WriteString(")") |
| 506 | } |
| 507 | return nil |
| 508 | } |
| 509 | |
| 510 | // isLeftRecursive indicates whether the parser resolves the call in a left-recursive manner as |
| 511 | // this can have an effect of how parentheses affect the order of operations in the AST. |
no test coverage detected