diff trunk/src/cmd/Generate.d @ 422:ad7977fe315a

Added support for column numbers in error messages. Moved class Location to module Information. In class Lexer: Renamed p_newl to beginLine. Added member errorLoc. Renamed fileName to filePath. Tidied up the code and reordered some methods. Renamed set_p_newl() to setLineBegin(). All other modifications are pretty much self-explanatory.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 30 Sep 2007 15:20:35 +0200
parents 0a4619735ce9
children ea8c7459f1c4
line wrap: on
line diff
--- a/trunk/src/cmd/Generate.d	Sat Sep 29 14:26:14 2007 +0200
+++ b/trunk/src/cmd/Generate.d	Sun Sep 30 15:20:35 2007 +0200
@@ -281,11 +281,11 @@
     print(tags[DocPart.CompBegin]~\n);
     foreach (error; lx.errors)
     {
-      print.formatln(tags[DocPart.Error], "L", lx.fileName, error.loc, "L", xml_escape(error.getMsg));
+      print.formatln(tags[DocPart.Error], "L", error.filePath, Format("{0},{1}", error.loc, error.col), "L", xml_escape(error.getMsg));
     }
     foreach (error; parser.errors)
     {
-      print.formatln(tags[DocPart.Error], "P", lx.fileName, error.loc, "P", xml_escape(error.getMsg));
+      print.formatln(tags[DocPart.Error], "P", error.filePath, Format("{0},{1}", error.loc, error.col), "P", xml_escape(error.getMsg));
     }
     print(tags[DocPart.CompEnd]~\n);
   }
@@ -390,7 +390,7 @@
     print(tags[DocPart.CompBegin]~\n);
     foreach (error; lx.errors)
     {
-      print.formatln(tags[DocPart.Error], "L", lx.fileName, error.loc, "L", xml_escape(error.getMsg));
+      print.formatln(tags[DocPart.Error], "L", error.filePath, Format("{0},{1}", error.loc, error.col), "L", xml_escape(error.getMsg));
     }
     print(tags[DocPart.CompEnd]~\n);
   }