コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: Depends.cs プロジェクト: JamesJustinHarrell/niviok
 //module
 //identikeys that must be exposed by import and/or expose nodes
 public static HashSet<Identifier> depends(Node_Module node)
 {
     return depends(node.sieve);
 }
コード例 #3
0
ファイル: Bridge.cs プロジェクト: JamesJustinHarrell/niviok
        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);
        }
コード例 #4
0
ファイル: Main.cs プロジェクト: JamesJustinHarrell/niviok
 void printTree(Node_Module root)
 {
     printNode(0, root);
 }