Beispiel #1
0
        private static void Parse(Member member, List<Class> classes)
        {
            if (!member.Visited)
            {
                member.Visited = true;
                if (member.Type != MemberType.Global)
                {
                    if (member.Members.Count != 0)
                    {
                        // it has members, so its probably a class
                        classes.Add(new Class() { Name = member.GetOfficialName() });
                    }

                    /*foreach (var mem in member.Members.Values)
                    {
                        Parse(mem, classes);
                    }*/
                }

                foreach (var mem in member.Body.Values)
                {
                    Parse(mem, classes);
                }
            }
        }
Beispiel #2
0
        private static void Parse(Member member, List <Class> classes)
        {
            if (!member.Visited)
            {
                member.Visited = true;
                if (member.Type != MemberType.Global)
                {
                    if (member.Members.Count != 0)
                    {
                        // it has members, so its probably a class
                        classes.Add(new Class()
                        {
                            Name = member.GetOfficialName()
                        });
                    }


                    /*foreach (var mem in member.Members.Values)
                     * {
                     *  Parse(mem, classes);
                     * }*/
                }


                foreach (var mem in member.Body.Values)
                {
                    Parse(mem, classes);
                }
            }
        }
Beispiel #3
0
        private static Method GenerateMethod(Member member)
        {
            Method meth = new Method()
            {
                Name = member.GetOfficialName()
            };

            if (member.ConsolidatedType != null)
            {
                meth.ReturnType = member.ConsolidatedType.GetName();
            }

            foreach (var para in member.Parameters)
            {
                Parameter par = par = new Parameter()
                {
                    Name = para.Value.GetOfficialName()
                };
                if (para.Value.DataType == DataType.Reference)
                {
                    par.Type = GetType(para.Value.Assignments).GetName();
                }

                meth.Parameters.Add(par);
            }

            return(meth);
        }
Beispiel #4
0
        private static Method GenerateMethod(Member member)
        {
            Method meth = new Method() { Name = member.GetOfficialName() };

            if (member.ConsolidatedType != null)
            {
                meth.ReturnType = member.ConsolidatedType.GetName();
            }

            foreach (var para in member.Parameters)
            {
                Parameter par = par = new Parameter(){Name = para.Value.GetOfficialName()};
                if (para.Value.DataType == DataType.Reference)
                {
                    par.Type = GetType(para.Value.Assignments).GetName();
                }

                meth.Parameters.Add(par);
            }

            return meth;
        }