void addPath(List<Scope> scopePath, Assignment a) {
   if (scopePath.isEmpty()) {
     if (a != null) {
       assignments.add(a);
     }
     return;
   }
   Scope lastParent = scopePath.remove(scopePath.size() - 1);
   for (ScopeTreeNode stn : children) {
     if (stn.scope == lastParent) {
       stn.addPath(scopePath, a);
       lastParent = null;
       break;
     }
   }
   if (lastParent != null) {
     ScopeTreeNode newChild = new ScopeTreeNode(lastParent);
     children.add(newChild);
     newChild.addPath(scopePath, a);
   }
 }