~ubuntu-branches/ubuntu/oneiric/haxe/oneiric

« back to all changes in this revision

Viewing changes to haxe/std/tools/haxedoc/Main.hx

  • Committer: Bazaar Package Importer
  • Author(s): Jens Peter Secher
  • Date: 2010-01-31 23:08:43 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100131230843-1cxte2x20ypk9c25
Tags: 1:2.5-1
New upstream version, taken from new upstream subversion repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                        generateEntry(html,e,"content/");
91
91
        }
92
92
 
93
 
        static function findClass( t : TypeRoot, path : Array<String>, pos : Int ) {
94
 
                var name = path[pos];
95
 
                var pack = (pos != path.length - 1);
96
 
                var def = null;
97
 
                for( c in t )
98
 
                        switch( c ) {
99
 
                        case TPackage(pname,_,subs):
100
 
                                if( name == pname ) {
101
 
                                        if( pack )
102
 
                                                return findClass(subs,path,pos+1);
103
 
                                        def = c;
104
 
                                }
105
 
                        default:
106
 
                                if( pack ) continue;
107
 
                                var inf = TypeApi.typeInfos(c);
108
 
                                if( inf.path.toLowerCase() == path.join(".") )
109
 
                                        return c;
110
 
                        }
111
 
                return def;
112
 
        }
113
 
 
114
93
        public static function main() {
115
94
                if( neko.Web.isModNeko ) {
116
95
                        var h = neko.Web.getParams();
138
117
                                html.process(TPackage("root","root",data));
139
118
                        else {
140
119
                                var clpath = clname.toLowerCase().split("/").join(".").split(".");
141
 
                                var f = findClass(data,clpath,0);
 
120
                                var f = html.find(data,clpath,0);
142
121
                                if( f == null )
143
122
                                        throw "Class not found : "+clpath.join(".");
144
123
                                html.process(f);