(ast: Unary)
| 76 | } |
| 77 | |
| 78 | visitUnary(ast: Unary): TcbExpr { |
| 79 | // Note that we don't need to guard against sequences like `+ +a` collapsing into `++a`, |
| 80 | // because `wrapForTypeChecker` always parenthesizes nested unary expressions. |
| 81 | const expr = this.translate(ast.expr).print(); |
| 82 | const node = new TcbExpr(ast.isPrefix ? `${ast.operator}${expr}` : `${expr}${ast.operator}`); |
| 83 | return node.wrapForTypeChecker().addParseSpanInfo(ast.sourceSpan); |
| 84 | } |
| 85 | |
| 86 | visitBinary(ast: Binary): TcbExpr { |
| 87 | const lhs = this.translate(ast.left); |
nothing calls this directly
no test coverage detected