예제 #1
0
        FlowGraphNode ParseTypeDecl(Dictionary <string, object> item)
        {
            TypeDecl node = new TypeDecl(Id++);

            if (item.ContainsKey("name"))
            {
                node.name = item["name"].ToString();
            }
            node.Type = ParseNode(((Dictionary <string, object>)item["type"]));
            return(node);
        }
예제 #2
0
        string GetTypeOfTypeDef(String type, List <FlowGraphNode> GlobalScope)
        {
            string result = null;

            foreach (FlowGraphNode glob in GlobalScope)
            {
                if (glob.getNodeType() == NodeType.E_TYPEDEF)
                {
                    TypeDef node = (TypeDef)glob;
                    if (node.name == type)
                    {
                        TypeDecl decl = (TypeDecl)node.TypeDecl;
                        result = decl.Type.getNodeType().ToString();
                    }
                }
            }
            return(result);
        }