Пример #1
0
        public string BuildGraphDAG()
        {
            bool removeFromRemovedNodes = true;
            this.RemoveNodes(removeFromRemovedNodes);

            this.AddNodesToAST();
            this.MakeConnectionsForAddedNodes();

            this.UpdateModifiedNodes();
            string code = null;

            #if __TRANSFORM_TO_PROTOAST
            GraphTransform transform = new GraphTransform();
            List<ProtoCore.AST.AssociativeAST.AssociativeNode> graphIR = transform.ToGraphIR(this.Graph, this.gc);
            ProtoCore.CodeGenDS codeGen = new ProtoCore.CodeGenDS(graphIR);
            code = codeGen.GenerateCode();

            gc.UpdateAddedNodesInModifiedNameList();
            #else
            code = this.gc.PrintGraph();
            #endif

            gc.UpdateDirtyFlags(nodesToModify);

            return code;
        }
Пример #2
0
        public string BuildGraphDAG()
        {
            bool removeFromRemovedNodes = true;

            this.RemoveNodes(removeFromRemovedNodes);

            this.AddNodesToAST();
            this.MakeConnectionsForAddedNodes();

            this.UpdateModifiedNodes();
            string code = null;

#if __TRANSFORM_TO_PROTOAST
            GraphTransform transform = new GraphTransform();
            List <ProtoCore.AST.AssociativeAST.AssociativeNode> graphIR = transform.ToGraphIR(this.Graph, this.gc);
            ProtoCore.CodeGenDS codeGen = new ProtoCore.CodeGenDS(graphIR);
            code = codeGen.GenerateCode();

            gc.UpdateAddedNodesInModifiedNameList();
#else
            code = this.gc.PrintGraph();
#endif

            gc.UpdateDirtyFlags(nodesToModify);

            return(code);
        }