ISetWriter defWriter = VF.setWriter();
for(IValue def : env.productions){
defWriter.insert(def);
}
ITuple t = VF.tuple(importWriter.done(), extendWriter.done(), defWriter.done());
result.put(VF.string(m), t);
}else if(m.equals(getName())) { // This is the root scope.
ISetWriter importWriter = VF.setWriter();
for(String impname : importedModules){
if(!done.contains(impname)) todo.add(impname);
importWriter.insert(VF.string(impname));
}
ISetWriter extendWriter = VF.setWriter();
for(String impname : getExtends()){
if(!done.contains(impname)) todo.add(impname);
extendWriter.insert(VF.string(impname));
}
ISetWriter defWriter = VF.setWriter();
for(IValue def : productions){
defWriter.insert(def);
}
ITuple t = VF.tuple(importWriter.done(), extendWriter.done(), defWriter.done());
result.put(VF.string(m), t);
}
}