annotate trunk/src/dil/Information.d @ 391:33b566df6af4

Migrated project to Tango. Decremented the numbers of the format placeholders in the localized messages by one. Replaced all instances of writef/ln with Stdout. Added module common.d with string aliases and a global Layout!(char) instance. Replaced %s format specifiers with index placeholders in html/xml_tags. Changed member Information.arguments to string message. Copied std.metastring, std.uni and std.utf from Phobos.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 15 Sep 2007 17:12:26 +0200
parents a48a987f7515
children ad7977fe315a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
1 /++
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
2 Author: Aziz Köksal
249
32d354584b28 - Upgraded license notices to GPL3.
aziz
parents: 94
diff changeset
3 License: GPL3
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
4 +/
326
4a7359b88c11 - Added package 'dil' to module declarations.
aziz
parents: 325
diff changeset
5 module dil.Information;
327
a48a987f7515 - Added package dil to import declarations.
aziz
parents: 326
diff changeset
6 import dil.Messages;
391
33b566df6af4 Migrated project to Tango.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 327
diff changeset
7 import common;
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
8
94
0fe650a7a8d1 - Renamed Type enum to InfoType in module Information.
aziz
parents: 71
diff changeset
9 enum InfoType
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
10 {
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
11 Lexer,
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
12 Parser,
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
13 Semantic
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
14 }
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
15
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
16 class Information
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
17 {
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
18 MID id;
94
0fe650a7a8d1 - Renamed Type enum to InfoType in module Information.
aziz
parents: 71
diff changeset
19 InfoType type;
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
20 uint loc;
391
33b566df6af4 Migrated project to Tango.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 327
diff changeset
21 string message;
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
22
391
33b566df6af4 Migrated project to Tango.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 327
diff changeset
23 this(InfoType type, MID id, uint loc, string message)
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
24 {
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
25 this.id = id;
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
26 this.type = type;
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
27 this.loc = loc;
391
33b566df6af4 Migrated project to Tango.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 327
diff changeset
28 this.message = message;
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
29 }
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
30
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
31 string getMsg()
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
32 {
391
33b566df6af4 Migrated project to Tango.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents: 327
diff changeset
33 return this.message;
69
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
34 }
24db7c5522d5 - Added module Information for compiler messages like warnings, info and errors to the user.
aziz
parents:
diff changeset
35 }