* Look up a `ts.Expression` representing the value of some operation in the current `Scope`, * including any parent scope(s). This method always returns a mutable clone of the * `ts.Expression` with the comments cleared. * * @param node a `Node` of the operation in question. The lookup p
(node: LocalSymbol, directive?: TcbDirectiveMetadata)
| 305 | */ |
| 306 | |
| 307 | resolve(node: LocalSymbol, directive?: TcbDirectiveMetadata): TcbExpr { |
| 308 | // Attempt to resolve the operation locally. |
| 309 | const res = this.resolveLocal(node, directive); |
| 310 | if (res !== null) { |
| 311 | return res; |
| 312 | } else if (this.parent !== null) { |
| 313 | // Check with the parent. |
| 314 | return this.parent.resolve(node, directive); |
| 315 | } else { |
| 316 | throw new Error(`Could not resolve ${node} / ${directive}`); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * Add a statement to this scope. |
nothing calls this directly
no test coverage detected