comparison 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
comparison
equal deleted inserted replaced
206:d3c148ca429b 207:e0551773a005
19 ExpectedIdAfterDot, 19 ExpectedIdAfterDot,
20 ExpectedExp, 20 ExpectedExp,
21 ExpectedCastType, 21 ExpectedCastType,
22 InvalidDeclType, 22 InvalidDeclType,
23 InvalidType, 23 InvalidType,
24 UnexpectedLinkType,
24 // - imports/module 25 // - imports/module
25 ExpectedIdAfterPackage, 26 ExpectedIdAfterPackage,
26 RenameMustBeSingleIdent, 27 RenameMustBeSingleIdent,
28 UnexpectedEOF,
27 29
28 30
29 // Imports 31 // sema
30 CannotFindModule, 32 CannotFindModule,
33 InvalidImplicitCast,
34 UndefinedIdentifier,
35 UndefinedType,
36 MissingMember,
37 CannotRedeclare,
38 // - switch
39 MultipleDefaults,
40 OverlappingCases,
41 InvalidCaseValue,
42 NoConstructor,
43 NoMachingCon,
44 CandidateNr,
45 NoMethodByName,
46 NoMachingMethod,
47 CannotReassignSArray,
48 CanOnlyDerefPointers,
49 CannotCallMethod,
50
51 // Strings
52 InvalidStrPrefix,
53 InvalidStrEscape,
54 InvalidUtf8Hex,
55 InvalidHexStrChar,
56 InvalidCharEntity,
57 NoCharEntityEnd,
58 StringShortEscape,
59 StringHexInvalid,
60 InvalidStartInteger,
61 IntegerToLarge,
62 FloatingToLarge,
63 FloatingInvalidEnd,
64 FloatingBadLocation,
65 FloatingDotInE,
66
67 // Protection
68 CannotAccessPrivate,
31 } 69 }
32 70
33 enum MessageType 71 enum MessageType
34 { 72 {
35 Warning, 73 Warning,
48 private alias MessageType.Warning War; 86 private alias MessageType.Warning War;
49 private alias MessageEntry E; 87 private alias MessageEntry E;
50 static this() 88 static this()
51 { 89 {
52 Messages = [ 90 Messages = [
91 // lexing
53 UnexpectedEOFBlock : E(Err, "Unexpected end of file. Unclosed comment block"), 92 UnexpectedEOFBlock : E(Err, "Unexpected end of file. Unclosed comment block"),
54 InvalidSymbol : E(Err, "Read invalid symbol: '%0'"), 93 InvalidSymbol : E(Err, "Read invalid symbol: '%0'"),
55 OnlyOneDotFloating : E(Err, "Only one '.' is allowed in an floating number"), 94 OnlyOneDotFloating : E(Err, "Only one '.' is allowed in an floating number"),
56 OnlyOneEFloating : E(Err, "Only one E is allowed in an floating number"), 95 OnlyOneEFloating : E(Err, "Only one E is allowed in an floating number"),
57 96
97 // parsing
58 UnexpectedTokMulti : E(Err, "Unexpected token, got %0 expected one of %1"), 98 UnexpectedTokMulti : E(Err, "Unexpected token, got %0 expected one of %1"),
59 UnexpectedTokSingle : E(Err, "Unexpected token, got %0 expected %1"), 99 UnexpectedTokSingle : E(Err, "Unexpected token, got %0 expected %1"),
60 UnexpectedTok : E(Err, "Unexpected token %0"), 100 UnexpectedTok : E(Err, "Unexpected token %0"),
61 CaseValueMustBeInt : E(Err, "Cases can only be integer literals"), 101 CaseValueMustBeInt : E(Err, "Cases can only be integer literals"),
62 UnexpectedBeginStmt : E(Err, "Unexpected begining of statement."), 102 UnexpectedBeginStmt : E(Err, "Unexpected begining of statement."),
65 ExpectedExp : E(Err, "Expected expression"), 105 ExpectedExp : E(Err, "Expected expression"),
66 ExpectedCastType : E(Err, "Expected cast type"), 106 ExpectedCastType : E(Err, "Expected cast type"),
67 InvalidDeclType : E(Err, "Invalid declaration type"), 107 InvalidDeclType : E(Err, "Invalid declaration type"),
68 InvalidType : E(Err, "Invalid type"), 108 InvalidType : E(Err, "Invalid type"),
69 ExpectedIdAfterPackage : E(Err, "Identifier expected following package"), 109 ExpectedIdAfterPackage : E(Err, "Identifier expected following package"),
110 UnexpectedLinkType : E(Err, "Invalid linkage type. Only C, C++, D, Windows, Pascal and System is allowed"),
111 UnexpectedEOF : E(Err, "Unexpected EOF after '%0'"),
70 112
71 CannotFindModule : E(Err, "Cannot find module '%0'") 113 // sema
114 CannotFindModule : E(Err, "Cannot find module '%0'"),
115 InvalidImplicitCast : E(Err, "Cannot make implicit cast between '%0' and '%1'"),
116 UndefinedIdentifier : E(Err, "Undefined identifier '%0'"),
117 UndefinedType : E(Err, "Undefined type '%0'"),
118 MissingMember : E(Err, "%0 %1 has no member %2"),
119 CannotRedeclare : E(Err, "Cannot redeclare '%0'"),
120 NoConstructor : E(Err, "No constructor avaible"),
121 NoMachingCon : E(Err, "No maching constructor. Candidates are:"),
122 CandidateNr : E(Err, "Candidate number %0"),
123 NoMethodByName : E(Err, "No method with that name"),
124 NoMachingMethod : E(Err, "No maching method. Candidates are:"),
125 // - switch
126 MultipleDefaults
127 : E(Err, "Switch statements can't have multiple defaults"),
128 OverlappingCases
129 : E(Err, "Can't have multiple cases with the same value."
130 " Values appearing in multiple cases: %0"),
131 InvalidCaseValue : E(Err, "Case values must be integers"),
132 CannotReassignSArray: E(Err, "Cannot reassign static arrays"),
133 CanOnlyDerefPointers: E(Err, "Can only deref pointers, not '%0'"),
134 CannotCallMethod : E(Err, "Cannot call a method of type '%0' with '%1'"),
135
136 // literals
137 InvalidStrPrefix : E(Err, "Invalid string literal prefix"),
138 InvalidStrEscape : E(Err, "Invalid escape sequence"),
139 InvalidUtf8Hex : E(Err, "Invalid Utf8 hex char"),
140 NoCharEntityEnd : E(Err, "Character entity have no end, insert ';'"),
141 InvalidCharEntity : E(Err, "Invalid character entity"),
142 InvalidHexStrChar : E(Err, "Invalid character in hex string"),
143 StringShortEscape : E(Err, "String literal is to short for escape sequence"),
144 StringHexInvalid : E(Err, "Hex escape sequence have invalid digit at position %0 of %1"),
145 InvalidStartInteger : E(Err, "Invalid begining of number"),
146 IntegerToLarge : E(Err, "Integer is to large. Max size is 18446744073709551615"),
147 FloatingToLarge : E(Err, "Floating literal is to large"),
148 FloatingInvalidEnd : E(Err, "Floating literal have wrong ending"),
149 FloatingBadLocation : E(Err, "Bad location for '%0' in floting literal"),
150 FloatingDotInE : E(Err, "There cannot be a dot in the exponent of a floating literal"),
151 CannotAccessPrivate : E(Err, "Cannot access private member.")
72 ]; 152 ];
73 } 153 }
74 154