diff trunk/src/Messages.d @ 54:e55bd2270f94

- Relocated messages table to a separate module.
author aziz
date Wed, 27 Jun 2007 17:58:00 +0000
parents
children 63af7ddf52e1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trunk/src/Messages.d	Wed Jun 27 17:58:00 2007 +0000
@@ -0,0 +1,71 @@
+/++
+  Author: Aziz Köksal
+  License: GPL2
++/
+module Messages;
+
+/// Index into table of error messages.
+enum MID
+{
+  InvalidUnicodeCharacter,
+  InvalidUTF8Sequence,
+  // ''
+  UnterminatedCharacterLiteral,
+  EmptyCharacterLiteral,
+  // #line
+  ExpectedIdentifierSTLine,
+  ExpectedNormalStringLiteral,
+  ExpectedNumberAfterSTLine,
+  NewlineInSpecialToken,
+  UnterminatedSpecialToken,
+  // ""
+  UnterminatedString,
+  // x""
+  NonHexCharInHexString,
+  OddNumberOfDigitsInHexString,
+  UnterminatedHexString,
+  // /* */ /+ +/
+  UnterminatedBlockComment,
+  UnterminatedNestedComment,
+  // `` r""
+  UnterminatedRawString,
+  UnterminatedBackQuoteString,
+  // \x \u \U
+  UndefinedEscapeSequence,
+  InsufficientHexDigits,
+  // \&[a-zA-Z][a-zA-Z0-9]+;
+  UnterminatedHTMLEntity,
+  InvalidBeginHTMLEntity,
+}
+
+string[] messages = [
+  "invalid Unicode character.",
+  "invalid UTF-8 sequence.",
+  // ''
+  "unterminated character literal.",
+  "empty character literal.",
+  // #line
+  "expected 'line' after '#'.",
+  `the filespec must be defined in a double quote string literal (e.g. "filespec".)`,
+  "positive integer expected after #line",
+  "newline not allowed inside special token.",
+  "expected a terminating newline after special token.",
+  // ""
+  "unterminated string literal.",
+  // x""
+  "non-hex character '{1}' found in hex string.",
+  "odd number of hex digits in hex string.",
+  "unterminated hex string.",
+  // /* */ /+ +/
+  "unterminated block comment (/* */).",
+  "unterminated nested comment (/+ +/).",
+  // `` r""
+  "unterminated raw string.",
+  "unterminated back quote string.",
+  // \x \u \U
+  "found undefined escape sequence.",
+  "insufficient number of hex digits in escape sequence.",
+  // \&[a-zA-Z][a-zA-Z0-9]+;
+  "unterminated html entity.",
+  "html entities must begin with a letter.",
+];