comparison trunk/src/cmd/DDoc.d @ 799:fd719161e743

New ddoc emitter for XML type output.
author Jari-Matti M?kel? <jmjm@iki.fi>
date Sat, 01 Mar 2008 18:04:29 +0200
parents 57ef69eced96
children dcd30b0ba711
comparison
equal deleted inserted replaced
798:c24be8d4f6ab 799:fd719161e743
2 Author: Aziz Köksal 2 Author: Aziz Köksal
3 License: GPL3 3 License: GPL3
4 +/ 4 +/
5 module cmd.DDoc; 5 module cmd.DDoc;
6 6
7 import cmd.DDocXML;
7 import cmd.Generate; 8 import cmd.Generate;
8 import dil.doc.Parser; 9 import dil.doc.Parser;
9 import dil.doc.Macro; 10 import dil.doc.Macro;
10 import dil.doc.Doc; 11 import dil.doc.Doc;
11 import dil.ast.Node; 12 import dil.ast.Node;
96 mtable.insert("DOCFILENAME", mod.getFQN() ~ ".html"); 97 mtable.insert("DOCFILENAME", mod.getFQN() ~ ".html");
97 auto timeStr = Time.toString(); 98 auto timeStr = Time.toString();
98 mtable.insert("DATETIME", timeStr); 99 mtable.insert("DATETIME", timeStr);
99 mtable.insert("YEAR", Time.year(timeStr)); 100 mtable.insert("YEAR", Time.year(timeStr));
100 101
101 auto doc = new DDocEmitter(mod, mtable, incUndoc, tokenHL); 102 auto doc = new DDocXMLEmitter(mod, mtable, incUndoc, tokenHL);
102 doc.emit(); 103 doc.emit();
103 // Set BODY macro to the text produced by the DDocEmitter. 104 // Set BODY macro to the text produced by the DDocEmitter.
104 mtable.insert("BODY", doc.text); 105 mtable.insert("BODY", doc.text);
105 // Do the macro expansion pass. 106 // Do the macro expansion pass.
106 auto fileText = MacroExpander.expand(mtable, "$(DDOC)", mod.filePath, infoMan); 107 auto fileText = MacroExpander.expand(mtable, "$(DDOC)", mod.filePath, infoMan);