
1 // 2 // Copyright (c) 2007, Brian Frank and Andy Frank 3 // Licensed under the Academic Free License version 3.0 4 // 5 // History: 6 // 9 May 07 Andy Frank Creation 7 // 8 9 using compiler 10 11 ** 12 ** SourceToHtml generates a HTML file for each type in pod 13 ** 14 class SourceToHtml : DocCompilerSupport 15 { 16 17 new make(DocCompiler compiler) 18 : super(compiler) 19 { 20 } 21 22 Void run() 23 { 24 compiler.pod.types.each |Type t| 25 { 26 if (!HtmlGenerator.showType(t)) return 27 generate(t) 28 } 29 } 30 31 Void generate(Type t) 32 { 33 srcFileFacet := t->sourceFile 34 srcFile := t.pod.files["/src/$srcFileFacet".toUri] 35 if (srcFile == null) return 36 37 log.debug(" Source [$t]") 38 file := compiler.podDir + "${t.name}_src.html".toUri 39 loc := Location.make("Source $t.qname") 40 SourceToHtmlGenerator.make(compiler, loc, file.out, t, srcFile).generate 41 } 42 }