diff src/basic/Messages.d @ 207:e0551773a005

Added the correct version.
author Anders Johnsen <skabet@gmail.com>
date Tue, 12 Aug 2008 18:19:34 +0200
parents d3c148ca429b
children
line wrap: on
line diff
--- a/src/basic/Messages.d	Tue Aug 12 18:14:56 2008 +0200
+++ b/src/basic/Messages.d	Tue Aug 12 18:19:34 2008 +0200
@@ -21,13 +21,51 @@
     ExpectedCastType,
     InvalidDeclType,
     InvalidType,
+    UnexpectedLinkType,
     //   - imports/module
     ExpectedIdAfterPackage,
     RenameMustBeSingleIdent,
+    UnexpectedEOF,
 
 
-    // Imports
+    // sema
     CannotFindModule,
+    InvalidImplicitCast,
+    UndefinedIdentifier,
+    UndefinedType,
+    MissingMember,
+    CannotRedeclare,
+    //   - switch
+    MultipleDefaults,
+    OverlappingCases,
+    InvalidCaseValue,
+    NoConstructor,
+    NoMachingCon,
+    CandidateNr,
+    NoMethodByName,
+    NoMachingMethod,
+    CannotReassignSArray,
+    CanOnlyDerefPointers,
+    CannotCallMethod,
+
+    // Strings
+    InvalidStrPrefix,
+    InvalidStrEscape,
+    InvalidUtf8Hex,
+    InvalidHexStrChar,
+    InvalidCharEntity,
+    NoCharEntityEnd,
+    StringShortEscape,
+    StringHexInvalid,
+    InvalidStartInteger,
+    IntegerToLarge,
+    FloatingToLarge,
+    FloatingInvalidEnd,
+    FloatingBadLocation,
+    FloatingDotInE,
+
+    // Protection
+    CannotAccessPrivate,
 }
 
 enum MessageType
@@ -50,11 +88,13 @@
 static this()
 {
     Messages = [
+        // lexing
         UnexpectedEOFBlock  : E(Err, "Unexpected end of file. Unclosed comment block"),
         InvalidSymbol       : E(Err, "Read invalid symbol: '%0'"),
         OnlyOneDotFloating  : E(Err, "Only one '.' is allowed in an floating number"),
         OnlyOneEFloating    : E(Err, "Only one E is allowed in an floating number"),
 
+        // parsing
         UnexpectedTokMulti  : E(Err, "Unexpected token, got %0 expected one of %1"),
         UnexpectedTokSingle : E(Err, "Unexpected token, got %0 expected %1"),
         UnexpectedTok       : E(Err, "Unexpected token %0"),
@@ -67,8 +107,48 @@
         InvalidDeclType     : E(Err, "Invalid declaration type"),
         InvalidType         : E(Err, "Invalid type"),
         ExpectedIdAfterPackage : E(Err, "Identifier expected following package"),
+        UnexpectedLinkType  : E(Err, "Invalid linkage type. Only C, C++, D, Windows, Pascal and System is allowed"),
+        UnexpectedEOF       : E(Err, "Unexpected EOF after '%0'"),
 
-        CannotFindModule    : E(Err, "Cannot find module '%0'")
+        // sema
+        CannotFindModule    : E(Err, "Cannot find module '%0'"),
+        InvalidImplicitCast : E(Err, "Cannot make implicit cast between '%0' and '%1'"),
+        UndefinedIdentifier : E(Err, "Undefined identifier '%0'"),
+        UndefinedType       : E(Err, "Undefined type '%0'"),
+        MissingMember       : E(Err, "%0 %1 has no member %2"),
+        CannotRedeclare     : E(Err, "Cannot redeclare '%0'"),
+        NoConstructor       : E(Err, "No constructor avaible"),
+        NoMachingCon        : E(Err, "No maching constructor. Candidates are:"),
+        CandidateNr         : E(Err, "Candidate number %0"),
+        NoMethodByName      : E(Err, "No method with that name"),
+        NoMachingMethod     : E(Err, "No maching method. Candidates are:"),
+        //   - switch
+        MultipleDefaults
+            : E(Err, "Switch statements can't have multiple defaults"),
+        OverlappingCases
+            : E(Err, "Can't have multiple cases with the same value."
+                     " Values appearing in multiple cases: %0"),
+        InvalidCaseValue    : E(Err, "Case values must be integers"),
+        CannotReassignSArray: E(Err, "Cannot reassign static arrays"),
+        CanOnlyDerefPointers: E(Err, "Can only deref pointers, not '%0'"),
+        CannotCallMethod    : E(Err, "Cannot call a method of type '%0' with '%1'"),
+
+        // literals
+        InvalidStrPrefix    : E(Err, "Invalid string literal prefix"),
+        InvalidStrEscape    : E(Err, "Invalid escape sequence"),
+        InvalidUtf8Hex      : E(Err, "Invalid Utf8 hex char"),
+        NoCharEntityEnd     : E(Err, "Character entity have no end, insert ';'"),
+        InvalidCharEntity   : E(Err, "Invalid character entity"),
+        InvalidHexStrChar   : E(Err, "Invalid character in hex string"),
+        StringShortEscape   : E(Err, "String literal is to short for escape sequence"),
+        StringHexInvalid    : E(Err, "Hex escape sequence have invalid digit at position %0 of %1"),
+        InvalidStartInteger : E(Err, "Invalid begining of number"),
+        IntegerToLarge      : E(Err, "Integer is to large. Max size is 18446744073709551615"),
+        FloatingToLarge     : E(Err, "Floating literal is to large"),
+        FloatingInvalidEnd  : E(Err, "Floating literal have wrong ending"),
+        FloatingBadLocation : E(Err, "Bad location for '%0' in floting literal"),
+        FloatingDotInE      : E(Err, "There cannot be a dot in the exponent of a floating literal"),
+        CannotAccessPrivate : E(Err, "Cannot access private member.")
     ];
 }