protected virtual XmlElement serialize(Node_Module node) { XmlElement elem = _doc.CreateElement(node.typeName, desible1NS); append<Node_Integer>(elem, node.@niviokMajorVersionNumber, "niviok major version number"); append<Node_Integer>(elem, node.@niviokMinorVersionNumber, "niviok minor version number"); append<Node_Import>(elem, node.@imports, null); append<Node_Sieve>(elem, node.@sieve, null); return elem; }
//module //identikeys that must be exposed by import and/or expose nodes public static HashSet<Identifier> depends(Node_Module node) { return depends(node.sieve); }
static void buildStandardLibrary(Node_Module node) { IScope scope = new Scope(null, new ScopeAllowance(false,false)); ScopeQueue sq = new ScopeQueue(); Sieve sieve = Executor.executeGetSieve(node.sieve, sq, scope); _stdSieve = sieve; GE.declareAssign( new Identifier("Interface"), ScidentreCategory.CONSTANT, new NType(), stdn_Interface.worker, sieve.visible ); GE.declareAssign( new Identifier("Object"), ScidentreCategory.CONSTANT, new NType(), stdn_Object.worker, sieve.visible ); GE.declareAssign( new Identifier("any"), ScidentreCategory.CONSTANT, new NType(), stdn_Object.worker, //xxx temporary - won't work when type checking is enabled sieve.visible ); sq.executeAll(); GE.declareAssign( new Identifier("true"), ScidentreCategory.CONSTANT, new NType(stdn_Bool), Client_Boolean.wrap(true), sieve.visible ); GE.declareAssign( new Identifier("false"), ScidentreCategory.CONSTANT, new NType(stdn_Bool), Client_Boolean.wrap(false), sieve.visible ); _std = LibraryWrapper.wrap(_stdSieve); }
void printTree(Node_Module root) { printNode(0, root); }