* Checks whether this javascript parser is variable defined. * @param {string} name variable name * @returns {boolean} true, when variable is defined
(name)
| 5516 | * @returns {boolean} true, when variable is defined |
| 5517 | */ |
| 5518 | isVariableDefined(name) { |
| 5519 | const info = this.scope.definitions.get(name); |
| 5520 | if (info === undefined) return false; |
| 5521 | if (info instanceof VariableInfo) { |
| 5522 | return !info.isFree(); |
| 5523 | } |
| 5524 | return true; |
| 5525 | } |
| 5526 | |
| 5527 | /** |
| 5528 | * Gets variable info. |