code: private List<Node> createObjectsForQualifiedName(String namespace) {
      List<Node> objects = new ArrayList<>();
      String[] parts = namespace.split("\\.");
  
      createObjectIfNew(objects, parts[0], true);
  
      if (parts.length >= 2) {
        StringBuilder currPrefix = new StringBuilder().append(parts[0]);
        for (int i = 1; i < parts.length; ++i) {
          currPrefix.append(".").append(parts[i]);
          createObjectIfNew(objects, currPrefix.toString(), false);
        }
      }
  
      return objects;
    }
docs: For a string "a.b.c" produce the following JS IR:
  
  <p>
  
  <pre>
  var a = a || {};
  a.b = a.b || {};
  a.b.c = a.b.c || {};</pre>