Mercurial > projects > dang
annotate basic/Messages.d @ 189:75d0544ddc45
Better error handling on unexpected EOF.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 13:50:01 +0200 |
parents | 8ea749b7da91 |
children | 658178183018 |
rev | line source |
---|---|
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
1 module basic.Messages; |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
2 |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
3 enum : uint |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
4 { |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
5 // Lex |
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
6 InvalidSymbol, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
7 InvalidIlligaleType, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
8 UnexpectedEOFBlock, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
9 OnlyOneDotFloating, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
10 OnlyOneEFloating, |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
11 |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
12 // Parse |
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
13 UnexpectedTokMulti, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
14 UnexpectedTokSingle, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
15 UnexpectedTok, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
16 CaseValueMustBeInt, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
17 UnexpectedBeginStmt, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
18 UnexpectedTokType, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
19 ExpectedIdAfterDot, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
20 ExpectedExp, |
92
771ac63898e2
A few better parser errors plus renaming most of the sema classes to match that they do now. Some have changes a lot.
Anders Johnsen <skabet@gmail.com>
parents:
89
diff
changeset
|
21 ExpectedCastType, |
771ac63898e2
A few better parser errors plus renaming most of the sema classes to match that they do now. Some have changes a lot.
Anders Johnsen <skabet@gmail.com>
parents:
89
diff
changeset
|
22 InvalidDeclType, |
771ac63898e2
A few better parser errors plus renaming most of the sema classes to match that they do now. Some have changes a lot.
Anders Johnsen <skabet@gmail.com>
parents:
89
diff
changeset
|
23 InvalidType, |
140
927ae00bd9d2
Added support for extern keyword. Being ignored atm though. Also changed ast/Module, so that you can get a list of only vars, functions or structs.
Anders Johnsen <skabet@gmail.com>
parents:
136
diff
changeset
|
24 UnexpectedLinkType, |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
25 // - imports/module |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
26 ExpectedIdAfterPackage, |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
27 RenameMustBeSingleIdent, |
189
75d0544ddc45
Better error handling on unexpected EOF.
Anders Johnsen <skabet@gmail.com>
parents:
183
diff
changeset
|
28 UnexpectedEOF, |
100
5f258eaf9517
Loading modules in. Just need to add them to the scope of the "main" Module now.
Anders Johnsen <skabet@gmail.com>
parents:
99
diff
changeset
|
29 |
5f258eaf9517
Loading modules in. Just need to add them to the scope of the "main" Module now.
Anders Johnsen <skabet@gmail.com>
parents:
99
diff
changeset
|
30 |
114
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
31 // sema |
100
5f258eaf9517
Loading modules in. Just need to add them to the scope of the "main" Module now.
Anders Johnsen <skabet@gmail.com>
parents:
99
diff
changeset
|
32 CannotFindModule, |
114
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
33 InvalidImplicitCast, |
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
34 UndefinedIdentifier, |
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
35 UndefinedType, |
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
36 MissingMember, |
136 | 37 CannotRedeclare, |
150 | 38 // - switch |
39 MultipleDefaults, | |
40 OverlappingCases, | |
41 InvalidCaseValue, | |
158
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
42 NoConstructor, |
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
43 NoMachingCon, |
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
44 CandidateNr, |
168
7982eb63c0eb
Some changes to get function overloading to work. Also class inherit works now - to some extend. needs vtables and all the complex stuff of it.
Anders Johnsen <skabet@gmail.com>
parents:
158
diff
changeset
|
45 NoMethodByName, |
7982eb63c0eb
Some changes to get function overloading to work. Also class inherit works now - to some extend. needs vtables and all the complex stuff of it.
Anders Johnsen <skabet@gmail.com>
parents:
158
diff
changeset
|
46 NoMachingMethod, |
183
8ea749b7da91
Fixed a few errors so that two more tests passes. Also, now you only need a type in a function param.
Anders Johnsen <skabet@gmail.com>
parents:
179
diff
changeset
|
47 CannotReassignSArray, |
8ea749b7da91
Fixed a few errors so that two more tests passes. Also, now you only need a type in a function param.
Anders Johnsen <skabet@gmail.com>
parents:
179
diff
changeset
|
48 CanOnlyDerefPointers, |
106
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
49 |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
50 // Strings |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
51 InvalidStrPrefix, |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
52 InvalidStrEscape, |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
53 InvalidUtf8Hex, |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
54 InvalidHexStrChar, |
111
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
55 InvalidCharEntity, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
56 NoCharEntityEnd, |
106
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
57 StringShortEscape, |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
58 StringHexInvalid, |
111
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
59 InvalidStartInteger, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
60 IntegerToLarge, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
61 FloatingToLarge, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
62 FloatingInvalidEnd, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
63 FloatingBadLocation, |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
64 FloatingDotInE, |
136 | 65 |
66 // Protection | |
67 CannotAccessPrivate, | |
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
68 } |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
69 |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
70 enum MessageType |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
71 { |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
72 Warning, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
73 Error, |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
74 } |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
75 |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
76 MessageEntry[uint] Messages; |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
77 |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
78 struct MessageEntry |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
79 { |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
80 MessageType type; |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
81 char[] message; |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
82 } |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
83 |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
84 private alias MessageType.Error Err; |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
85 private alias MessageType.Warning War; |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
86 private alias MessageEntry E; |
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
87 static this() |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
88 { |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
89 Messages = [ |
109 | 90 // lexing |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
91 UnexpectedEOFBlock : E(Err, "Unexpected end of file. Unclosed comment block"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
92 InvalidSymbol : E(Err, "Read invalid symbol: '%0'"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
93 OnlyOneDotFloating : E(Err, "Only one '.' is allowed in an floating number"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
94 OnlyOneEFloating : E(Err, "Only one E is allowed in an floating number"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
95 |
109 | 96 // parsing |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
97 UnexpectedTokMulti : E(Err, "Unexpected token, got %0 expected one of %1"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
98 UnexpectedTokSingle : E(Err, "Unexpected token, got %0 expected %1"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
99 UnexpectedTok : E(Err, "Unexpected token %0"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
100 CaseValueMustBeInt : E(Err, "Cases can only be integer literals"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
101 UnexpectedBeginStmt : E(Err, "Unexpected begining of statement."), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
102 UnexpectedTokType : E(Err, "Unexpected token in Type parsing. Got %0"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
103 ExpectedIdAfterDot : E(Err, "Expected identifier after '.'"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
104 ExpectedExp : E(Err, "Expected expression"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
105 ExpectedCastType : E(Err, "Expected cast type"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
106 InvalidDeclType : E(Err, "Invalid declaration type"), |
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
107 InvalidType : E(Err, "Invalid type"), |
100
5f258eaf9517
Loading modules in. Just need to add them to the scope of the "main" Module now.
Anders Johnsen <skabet@gmail.com>
parents:
99
diff
changeset
|
108 ExpectedIdAfterPackage : E(Err, "Identifier expected following package"), |
140
927ae00bd9d2
Added support for extern keyword. Being ignored atm though. Also changed ast/Module, so that you can get a list of only vars, functions or structs.
Anders Johnsen <skabet@gmail.com>
parents:
136
diff
changeset
|
109 UnexpectedLinkType : E(Err, "Invalid linkage type. Only C, C++, D, Windows, Pascal and System is allowed"), |
189
75d0544ddc45
Better error handling on unexpected EOF.
Anders Johnsen <skabet@gmail.com>
parents:
183
diff
changeset
|
110 UnexpectedEOF : E(Err, "Unexpected EOF after '%0'"), |
107
189c049cbfcc
Cleanup of codegen, better support for operators a few bugfixes
Anders Halager <halager@gmail.com>
parents:
100
diff
changeset
|
111 |
109 | 112 // sema |
106
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
113 CannotFindModule : E(Err, "Cannot find module '%0'"), |
179
2a1a635bd531
Changes the way messages can be displayed. Also added a toString to DType's for type printing.
Anders Johnsen <skabet@gmail.com>
parents:
168
diff
changeset
|
114 InvalidImplicitCast : E(Err, "Cannot make implicit cast between '%0' and '%1'"), |
114
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
115 UndefinedIdentifier : E(Err, "Undefined identifier '%0'"), |
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
116 UndefinedType : E(Err, "Undefined type '%0'"), |
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
117 MissingMember : E(Err, "%0 %1 has no member %2"), |
136 | 118 CannotRedeclare : E(Err, "Cannot redeclare '%0'"), |
158
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
119 NoConstructor : E(Err, "No constructor avaible"), |
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
120 NoMachingCon : E(Err, "No maching constructor. Candidates are:"), |
57b0b4464a0b
Parsing "new", putting it in AST and performs some tests on it. Eg. if the contructor exists and the params matches.
Anders Johnsen <skabet@gmail.com>
parents:
150
diff
changeset
|
121 CandidateNr : E(Err, "Candidate number %0"), |
168
7982eb63c0eb
Some changes to get function overloading to work. Also class inherit works now - to some extend. needs vtables and all the complex stuff of it.
Anders Johnsen <skabet@gmail.com>
parents:
158
diff
changeset
|
122 NoMethodByName : E(Err, "No method with that name"), |
7982eb63c0eb
Some changes to get function overloading to work. Also class inherit works now - to some extend. needs vtables and all the complex stuff of it.
Anders Johnsen <skabet@gmail.com>
parents:
158
diff
changeset
|
123 NoMachingMethod : E(Err, "No maching method. Candidates are:"), |
150 | 124 // - switch |
125 MultipleDefaults | |
126 : E(Err, "Switch statements can't have multiple defaults"), | |
127 OverlappingCases | |
128 : E(Err, "Can't have multiple cases with the same value." | |
129 " Values appearing in multiple cases: %0"), | |
130 InvalidCaseValue : E(Err, "Case values must be integers"), | |
183
8ea749b7da91
Fixed a few errors so that two more tests passes. Also, now you only need a type in a function param.
Anders Johnsen <skabet@gmail.com>
parents:
179
diff
changeset
|
131 CannotReassignSArray: E(Err, "Cannot reassign static arrays"), |
8ea749b7da91
Fixed a few errors so that two more tests passes. Also, now you only need a type in a function param.
Anders Johnsen <skabet@gmail.com>
parents:
179
diff
changeset
|
132 CanOnlyDerefPointers: E(Err, "Can only deref pointers, not '%0'"), |
109 | 133 |
114
3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
Anders Johnsen <skabet@gmail.com>
parents:
111
diff
changeset
|
134 // literals |
106
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
135 InvalidStrPrefix : E(Err, "Invalid string literal prefix"), |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
136 InvalidStrEscape : E(Err, "Invalid escape sequence"), |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
137 InvalidUtf8Hex : E(Err, "Invalid Utf8 hex char"), |
111
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
138 NoCharEntityEnd : E(Err, "Character entity have no end, insert ';'"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
139 InvalidCharEntity : E(Err, "Invalid character entity"), |
106
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
140 InvalidHexStrChar : E(Err, "Invalid character in hex string"), |
89db676fbacb
Now able of understanding strings.
Anders Johnsen <skabet@gmail.com>
parents:
100
diff
changeset
|
141 StringShortEscape : E(Err, "String literal is to short for escape sequence"), |
111
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
142 StringHexInvalid : E(Err, "Hex escape sequence have invalid digit at position %0 of %1"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
143 InvalidStartInteger : E(Err, "Invalid begining of number"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
144 IntegerToLarge : E(Err, "Integer is to large. Max size is 18446744073709551615"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
145 FloatingToLarge : E(Err, "Floating literal is to large"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
146 FloatingInvalidEnd : E(Err, "Floating literal have wrong ending"), |
c658172ca8a0
Parsing basic integers and floats.
Anders Johnsen <skabet@gmail.com>
parents:
109
diff
changeset
|
147 FloatingBadLocation : E(Err, "Bad location for '%0' in floting literal"), |
136 | 148 FloatingDotInE : E(Err, "There cannot be a dot in the exponent of a floating literal"), |
149 CannotAccessPrivate : E(Err, "Cannot access private member.") | |
89
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
150 ]; |
a49bb982a7b0
Using the new SourceLocation system to handle errors. Also, this is the first push for making the errors don't throw, but continue to check the source.
Anders Johnsen <skabet@gmail.com>
parents:
diff
changeset
|
151 } |
99
857f0d530789
Imports and improved module statement
Anders Halager <halager@gmail.com>
parents:
92
diff
changeset
|
152 |