comparison trunk/src/dil/Messages.d @ 789:c1d5cfd7aa44

Implemented string literal conversion. Removed two MID messages. Added MSG.InvalidUTF8SequenceInString. Added toUTF16() and toUTF32(). Fixed escape sequences. Added formatBytes() and findInvalidUTF8Sequence().
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Mon, 25 Feb 2008 02:56:22 +0100
parents 47c5099562c7
children c24be8d4f6ab
comparison
equal deleted inserted replaced
788:139c9a6a39a8 789:c1d5cfd7aa44
8 /// Index into table of compiler messages. 8 /// Index into table of compiler messages.
9 enum MID 9 enum MID
10 { 10 {
11 // Lexer messages: 11 // Lexer messages:
12 IllegalCharacter, 12 IllegalCharacter,
13 InvalidUnicodeCharacter, 13 // InvalidUnicodeCharacter,
14 InvalidUTF8Sequence, 14 InvalidUTF8Sequence,
15 // '' 15 // ''
16 UnterminatedCharacterLiteral, 16 UnterminatedCharacterLiteral,
17 EmptyCharacterLiteral, 17 EmptyCharacterLiteral,
18 // #line 18 // #line
19 ExpectedIdentifierSTLine, 19 ExpectedIdentifierSTLine,
20 ExpectedIntegerAfterSTLine, 20 ExpectedIntegerAfterSTLine,
21 ExpectedFilespec, // Deprecated. 21 // ExpectedFilespec,
22 UnterminatedFilespec, 22 UnterminatedFilespec,
23 UnterminatedSpecialToken, 23 UnterminatedSpecialToken,
24 // "" 24 // ""
25 UnterminatedString, 25 UnterminatedString,
26 // x"" 26 // x""
107 auto UTF32FileMustBeDivisibleBy4 = "the byte length of a UTF-32 source file must be divisible by 4."; 107 auto UTF32FileMustBeDivisibleBy4 = "the byte length of a UTF-32 source file must be divisible by 4.";
108 // DDoc macros: 108 // DDoc macros:
109 auto UndefinedDDocMacro = "DDoc macro '{}' is undefined"; 109 auto UndefinedDDocMacro = "DDoc macro '{}' is undefined";
110 auto UnterminatedDDocMacro = "DDoc macro '{}' has no closing ')'"; 110 auto UnterminatedDDocMacro = "DDoc macro '{}' has no closing ')'";
111 // Parser messages: 111 // Parser messages:
112 auto InvalidUTF8SequenceInString = "invalid UTF-8 sequence in string literal: '{0}'";
112 auto ModuleDeclarationNotFirst = "a module declaration is only allowed as the first declaration in a file"; 113 auto ModuleDeclarationNotFirst = "a module declaration is only allowed as the first declaration in a file";
113 auto StringPostfixMismatch = "string literal has mistmatching postfix character"; 114 auto StringPostfixMismatch = "string literal has mistmatching postfix character";
114 auto ExpectedIdAfterTypeDot = "expected identifier after '(Type).', not '{}'"; 115 auto ExpectedIdAfterTypeDot = "expected identifier after '(Type).', not '{}'";
115 auto ExpectedModuleIdentifier = "expected module identifier, not '{}'"; 116 auto ExpectedModuleIdentifier = "expected module identifier, not '{}'";
116 auto IllegalDeclaration = "illegal declaration found: {}"; 117 auto IllegalDeclaration = "illegal declaration found: {}";