/** * Return true if this node is known to be defined as a symbol in a * lexical scope other than the top-level (global) scope. * * @return {@code true} if this name appears as local variable, a let-bound * variable not in the global scope, a function parameter, a loop * variable, the property named in a {@link PropertyGet}, or in any other * context where the node is known not to resolve to the global scope. * Returns {@code false} if the node is defined in the top-level scope * (i.e., its defining scope is an {@link AstRoot} object), or if its * name is not defined as a symbol in the symbol table, in which case it * may be an external or built-in name (or just an error of some sort.) */ public boolean isLocalName() { Scope scope = getDefiningScope(); return scope != null && scope.getParentScope() != null; }
/** * Return true if this node is known to be defined as a symbol in a * lexical scope other than the top-level (global) scope. * * @return {@code true} if this name appears as local variable, a let-bound * variable not in the global scope, a function parameter, a loop * variable, the property named in a {@link PropertyGet}, or in any other * context where the node is known not to resolve to the global scope. * Returns {@code false} if the node is defined in the top-level scope * (i.e., its defining scope is an {@link AstRoot} object), or if its * name is not defined as a symbol in the symbol table, in which case it * may be an external or built-in name (or just an error of some sort.) */ public boolean isLocalName() { Scope scope = getDefiningScope(); return scope != null && scope.getParentScope() != null; }
/** * Return true if this node is known to be defined as a symbol in a * lexical scope other than the top-level (global) scope. * * @return {@code true} if this name appears as local variable, a let-bound * variable not in the global scope, a function parameter, a loop * variable, the property named in a {@link PropertyGet}, or in any other * context where the node is known not to resolve to the global scope. * Returns {@code false} if the node is defined in the top-level scope * (i.e., its defining scope is an {@link AstRoot} object), or if its * name is not defined as a symbol in the symbol table, in which case it * may be an external or built-in name (or just an error of some sort.) */ public boolean isLocalName() { Scope scope = getDefiningScope(); return scope != null && scope.getParentScope() != null; }
/** * Return true if this node is known to be defined as a symbol in a * lexical scope other than the top-level (global) scope. * * @return {@code true} if this name appears as local variable, a let-bound * variable not in the global scope, a function parameter, a loop * variable, the property named in a {@link PropertyGet}, or in any other * context where the node is known not to resolve to the global scope. * Returns {@code false} if the node is defined in the top-level scope * (i.e., its defining scope is an {@link AstRoot} object), or if its * name is not defined as a symbol in the symbol table, in which case it * may be an external or built-in name (or just an error of some sort.) */ public boolean isLocalName() { Scope scope = getDefiningScope(); return scope != null && scope.getParentScope() != null; }