diff trunk/src/cmd/DDoc.d @ 764:4579e8505d5e

Fixed unittests and removed dil.File. Fixed Converter.UTF16toUTF8(). Fixed an encode() function in dil.Unicode.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 16 Feb 2008 03:28:39 +0100
parents 307905dadf5d
children bc812843603c
line wrap: on
line diff
--- a/trunk/src/cmd/DDoc.d	Sat Feb 16 01:47:39 2008 +0100
+++ b/trunk/src/cmd/DDoc.d	Sat Feb 16 03:28:39 2008 +0100
@@ -22,8 +22,8 @@
 import dil.semantic.Symbol;
 import dil.semantic.Symbols;
 import dil.Information;
-import dil.File;
 import dil.Converter;
+import dil.SourceText;
 import common;
 
 import tango.stdc.time : time_t, time, ctime;
@@ -40,7 +40,7 @@
   MacroParser mparser;
   foreach (macroPath; macroPaths)
   {
-    auto macros = mparser.parse(loadMacroFile(macroPath));
+    auto macros = mparser.parse(loadMacroFile(macroPath, infoMan));
     mtable = new MacroTable(mtable);
     mtable.insert(macros);
   }
@@ -109,9 +109,11 @@
   file.write(fileText);
 }
 
-string loadMacroFile(string filePath)
+string loadMacroFile(string filePath, InfoManager infoMan)
 {
-  return sanitizeText(loadFile(filePath));
+  auto src = new SourceText(filePath);
+  src.load(infoMan);
+  return sanitizeText(src.data);
 }
 
 /// Traverses the syntax tree and writes DDoc macros to a string buffer.