use of com.google.javascript.jscomp.newtypes.FunctionNamespace in project closure-compiler by google.
the class NTIScope method addFunNamespace.
void addFunNamespace(Node qnameNode) {
if (qnameNode.isName()) {
String varName = qnameNode.getString();
checkArgument(isDefinedLocally(varName, false));
checkState(!this.localNamespaces.containsKey(varName));
NTIScope s = checkNotNull(this.localFunDefs.get(varName));
this.localNamespaces.put(varName, new FunctionNamespace(this.commonTypes, varName, s, qnameNode));
} else {
checkArgument(!isNamespace(qnameNode));
QualifiedName qname = QualifiedName.fromNode(qnameNode);
Namespace ns = getNamespace(qname.getLeftmostName());
NTIScope s = (NTIScope) ns.getDeclaration(qname).getFunctionScope();
ns.addNamespace(qname.getAllButLeftmost(), new FunctionNamespace(this.commonTypes, qname.toString(), s, qnameNode));
}
}
Aggregations