コード例 #1
0
ファイル: SyntaxTree.cs プロジェクト: AndrFran/dyplom
        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
ファイル: TestCaseBuilder.cs プロジェクト: AndrFran/dyplom
        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);
        }