Returns whether a template symbol is defined locally within the current scope.
(node: Variable | LetDeclaration | Reference)
| 352 | |
| 353 | /** Returns whether a template symbol is defined locally within the current scope. */ |
| 354 | isLocal(node: Variable | LetDeclaration | Reference): boolean { |
| 355 | if (node instanceof Variable) { |
| 356 | return this.varMap.has(node); |
| 357 | } |
| 358 | if (node instanceof LetDeclaration) { |
| 359 | return this.letDeclOpMap.has(node.name); |
| 360 | } |
| 361 | return this.referenceOpMap.has(node); |
| 362 | } |
| 363 | |
| 364 | /** |
| 365 | * Constructs a `Scope` given either a `Template` or a list of `Node`s. |
no test coverage detected