(ast: AST)
| 62 | ) {} |
| 63 | |
| 64 | translate(ast: AST): TcbExpr { |
| 65 | if (ast instanceof ASTWithSource) { |
| 66 | ast = ast.ast; |
| 67 | } |
| 68 | |
| 69 | // First attempt to let any custom resolution logic provide a translation for the given node. |
| 70 | const resolved = this.maybeResolve(ast); |
| 71 | if (resolved !== null) { |
| 72 | return resolved; |
| 73 | } |
| 74 | |
| 75 | return ast.visit(this); |
| 76 | } |
| 77 | |
| 78 | visitUnary(ast: Unary): TcbExpr { |
| 79 | const expr = this.translate(ast.expr); |
no test coverage detected