aboutsummaryrefslogtreecommitdiffhomepage
path: root/src-cslul/errors.h
blob: 2609106b75d7935a7e6a5c56f73aa0790c304fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

/*

  errors.h -- Error message strings

  Copyright © 2021-2024 Samuel Lidén Borell <samuel@kodafritt.se>

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.

*/

/* This file is to be included from error.c only.
   F=Fatal error, E=Error, W=Warning, H=Hint, S=Style remark */
MSGDEF(E, CSLUL_E_NOERROR, "No error. This is a bug in the compiler")
MSGDEF(F, CSLUL_E_OUTOFMEMORY, "Out of memory")
MSGDEF(E, CSLUL_E_OPENFILE, "Cannot open file")
MSGDEF(E, CSLUL_E_READFILE, "Cannot read from file")
MSGDEF(E, CSLUL_E_CREATEFILE, "Cannot create output file")
MSGDEF(E, CSLUL_E_WRITEFILE, "Cannot write to output file")
MSGDEF(E, CSLUL_E_INVALIDCHAR, "Invalid character '%.*s' in source file")
MSGDEF(S, CSLUL_E_TAB, "Tab character detected. Please use 4 spaces for indentation")
MSGDEF(E, CSLUL_E_BADUTF8, "Invalid UTF-8 character")
MSGDEF(E, CSLUL_E_DISALLOWEDUNICODE, "Disallowed Unicode control character")
MSGDEF(S, CSLUL_E_INDENTEDATTR, "Indented lines aren't allowed in module header")
MSGDEF(E, CSLUL_E_IDENTTOOLONG, "Identifier too long (maximum is 100 bytes)")
MSGDEF(E, CSLUL_E_UNEXPECTEDEOF, "Unexpected end of file")
MSGDEF(S, CSLUL_E_TRAILINGSPACE, "Trailing spaces at end of line")
MSGDEF(E, CSLUL_E_BADATTRCHAR, "Invalid character after attribute name")
MSGDEF(W, CSLUL_E_NOEOFNEWLINE, "Line break is required before end of file")
MSGDEF(W, CSLUL_E_BADATTRNAME, "Unknown module attribute '\\%.*s'")
MSGDEF(W, CSLUL_E_WRONGATTRORDER, "Wrong order of module attributes")
MSGDEF(E, CSLUL_E_MISSINGATTRVALUE, "Value for module attribute %.*s is missing")
MSGDEF(E, CSLUL_E_BADFILENAMECHAR, "'\\source' filenames may only contain a-z 0-9 _")
MSGDEF(E, CSLUL_E_FILENAMEDOT, "Filenames may not begin with a dot: '%.*s'")
MSGDEF(E, CSLUL_E_FILENAMEROOT, "File paths may not begin with '/': '%.*s'")
MSGDEF(E, CSLUL_E_FILENAMEDOUBLESLASH, "'//' is not allowed in filenames: '%.*s'")
MSGDEF(E, CSLUL_E_FILENAMEDOTDOT, "'..' is not allowed in filenames: '%.*s'")
MSGDEF(E, CSLUL_E_NONSLULFILE, "Filename '%.*s' does not end with .slul")
MSGDEF(E, CSLUL_E_BADDIRNAME, "Directory names may not end with .slul: '%.*s'")
MSGDEF(E, CSLUL_E_MAXSOURCEFILES, "Too many source files. Maximum is 10k")
MSGDEF(F, CSLUL_E_TREETOODEEP, "Internal tree data structure too large")
MSGDEF(E, CSLUL_E_DUPLICATEFILE, "Duplicate \\source filename '%.*s'")
MSGDEF(E, CSLUL_E_SOURCECASEDUP, "Duplicate \\source filename '%.*s' (case differences don't count)")
MSGDEF(E, CSLUL_E_BADMODULETYPE, "Unknown module type '%.*s'")
MSGDEF(E, CSLUL_E_MODNAMELENGTH, "Module name must be between 1-50 characters long (a-z0-9_)")
MSGDEF(E, CSLUL_E_MODNAMESTART, "Module names must start with a letter, a-z")
MSGDEF(E, CSLUL_E_MODNAMECHAR, "Module names may only contain characters a-z0-9_")
MSGDEF(E, CSLUL_E_VERSTRLENGTH, "Versions must be between 1-50 characters long (0-9a-z.~)") /* TODO put the characters in a hint instead? */
MSGDEF(E, CSLUL_E_VERSTRSTART, "Versions must start with a digit (0-9)")
MSGDEF(E, CSLUL_E_VERSTRCHAR, "Versions may only contain characters 0-9a-z.~")
MSGDEF(E, CSLUL_E_MODTYPEUNSTABLE, "'unstable' makes no sense for modules of this type, since they don't have any API")
MSGDEF(E, CSLUL_E_SPECWITHSOURCE, "'libraryspec' and 'pluginspec' modules may not have \\source attribute")
MSGDEF(E, CSLUL_E_MISSINGSOURCE, "Must have at least one \\source attribute for this module type")
MSGDEF(E, CSLUL_E_MISSINGATTR, "Module attribute \\%.*s is missing")
MSGDEF(E, CSLUL_E_OUTPUTSPEC, "Impossible to generate output files (except for C headers) for 'libraryspec' and 'pluginspec' modules")
MSGDEF(E, CSLUL_E_OUTPUTLIB, "Impossible to generate library from module of type '%.*s'")
MSGDEF(E, CSLUL_E_OUTPUTPLUGIN, "Impossible to generate plugin from module of type '%.*s'")
MSGDEF(E, CSLUL_E_OUTPUTEXE, "Impossible to generate executable from module of type '%.*s'")
MSGDEF(E, CSLUL_E_BADCPUABICOMBO, "Invalid combination of CPU and binary interface / system library")
MSGDEF(E, CSLUL_E_BADSYSABICOMBO, "Invalid combination of operating system and binary interface / system library")
MSGDEF(E, CSLUL_E_BADARCHFORMAT, "Incorrect format of target platform name '%.*s'")
MSGDEF(E, CSLUL_E_BADARCHCPU, "Unknown CPU type in string '%.*s'")
MSGDEF(E, CSLUL_E_BADARCHITEM, "Unknown item in target platform name '%.*s'")
MSGDEF(E, CSLUL_E_BADESCAPE, "Invalid escape sequence '%.*s'")
MSGDEF(E, CSLUL_E_STRINGTOOLONG, "String piece too long (maximum is 512 bytes)")
MSGDEF(E, CSLUL_E_ESCAPETOOLONG, "Escape sequence is too long")
MSGDEF(E, CSLUL_E_BADUNICODEESCAPE, "Unicode escape is too large (maximum is 10FFFF)")
MSGDEF(E, CSLUL_E_MISSINGESCAPE, "Escape sequence without following hex digits")
MSGDEF(E, CSLUL_E_BADNUMBERTYPE, "Invalid type of number")
MSGDEF(E, CSLUL_E_NODIGITS, "No digits in number")
MSGDEF(E, CSLUL_E_BADNUMBERCHAR, "Invalid character in number")
MSGDEF(E, CSLUL_E_NUMBERTOOLARGE, "Number is too large (maximum for any type is 2^64)")
MSGDEF(E, CSLUL_E_LEADINGZERO, "Leading zeros are not allowed in decimal (base 10) numbers")
MSGDEF(E, CSLUL_E_DOUBLEDECPOINT, "More than one decimal point in number")
MSGDEF(E, CSLUL_E_EXPONENTTOOLARGE, "Exponent is too large")
MSGDEF(E, CSLUL_E_NOEXPDIGITS, "Expected exponent digits after 'e'")
MSGDEF(E, CSLUL_E_NOFRACDIGITS, "Expected fractional digits after '.'")
MSGDEF(E, CSLUL_E_IDENTIFIEREXPECTED, "Expected an identifier here")
MSGDEF(E, CSLUL_E_BADTYPE, "Incorrect syntax. Expected a type here.")
MSGDEF(E, CSLUL_E_TYPEFUNCREFNOTFUNC, "Expected a type here. (Use \"funcref\" for function references)")
MSGDEF(E, CSLUL_E_BADINITVALTOKEN, "Unexpected symbol after declaration. Expected '='")
MSGDEF(W, CSLUL_E_BADINITVALBLANKLINE, "Line(s) between declaration and '='")
MSGDEF(E, CSLUL_E_IDENTEXISTS, "Identifier already in use")
MSGDEF(E, CSLUL_E_BADTOPLEVELTOKEN, "Invalid start token at top level")
MSGDEF(E, CSLUL_E_BADTOPLEVELCONTINUATION, "Unexpected symbol in top-level declaration")
MSGDEF(E, CSLUL_E_BADTOPLEVELCOLUMN, "Top-levels should start at column 1 on a new line")
MSGDEF(E, CSLUL_E_TYPEDEFWITHOUTEQUAL, "Missing = in type definition")
MSGDEF(E, CSLUL_E_TYPETOODEEP, "Too deep nesting of types")
MSGDEF(E, CSLUL_E_DUPLFIELD, "Duplicate field names in struct")
MSGDEF(E, CSLUL_E_NOFUNCENDCURLY, "Missing } after end of function")
MSGDEF(E, CSLUL_E_NOIFEND, "No corresponding \"if\" on this level")
MSGDEF(E, CSLUL_E_ELSEWITHOUTRCURLY, "Missing \"}\" before else")
MSGDEF(E, CSLUL_E_NOLOOPEND, "No corresponding loop on this level")
MSGDEF(E, CSLUL_E_BADSTMTLINESTART, "Invalid start of line in function")
MSGDEF(E, CSLUL_E_EXPRTOODEEP, "Too deep nesting of expressions")
MSGDEF(E, CSLUL_E_BADEXPRTOKEN, "Unexpected symbol in expression")
MSGDEF(E, CSLUL_E_OPERATOREXPECTED, "Operator expected here")
MSGDEF(E, CSLUL_E_MISSINGOPERAND, "Missing operand")
MSGDEF(E, CSLUL_E_TRAILINGCOMMA, "Trailing comma not allowed in parameter list")
MSGDEF(E, CSLUL_E_TRAILINGCOMMAINDEX, "Trailing comma not allowed in array index")
MSGDEF(E, CSLUL_E_TRAILINGCOMMASTRUCT, "Trailing comma is not needed in struct value")
MSGDEF(E, CSLUL_E_UNCLOSEDPAREN, "Unbalanced parenthesis (not closed)")
MSGDEF(E, CSLUL_E_INCOMPLETEEXPR, "Incomplete expression")
MSGDEF(E, CSLUL_E_OPERATORNOTEXP, "Operator not expected here")
MSGDEF(E, CSLUL_E_AMBIGUOUSOPERMIX, "Ambiguous mix of different operators. Use parentheses")
MSGDEF(E, CSLUL_E_BLOCKTOODEEP, "Too deep nesting of blocks")
MSGDEF(E, CSLUL_E_LOOPWITHOUTBRACES, "do-while loops must have { }")
MSGDEF(E, CSLUL_E_DOWITHOUTWHILE, "\"do {\" without \"} while\"")
MSGDEF(E, CSLUL_E_BREAKOUTSIDELOOP, "\"break\" outside loop")
MSGDEF(E, CSLUL_E_CONTINUEOUTSIDELOOP, "\"continue\" outside loop")
MSGDEF(E, CSLUL_E_DOTWITHOUTIDENT, "Dot which is not followed by identifier")
MSGDEF(E, CSLUL_E_DOTSPACEIDENT, "Space after \".\" in .typeident")
MSGDEF(E, CSLUL_E_FIELDINITCONTEXT, ".typeident= makes no sense here")
MSGDEF(E, CSLUL_E_NOTAFIELDINIT, "Expected a \".field=initial_value\" expression")
MSGDEF(E, CSLUL_E_INITOPENSTRUCT, "Struct cannot be created outside its implementation module")
MSGDEF(E, CSLUL_E_STRUCTINITWRONGORDER, "Struct fields come in the wrong order")
MSGDEF(E, CSLUL_E_STRUCTINITTOOMANY, "Too many values in struct initializer")
MSGDEF(E, CSLUL_E_STRUCTINITTOOFEW, "Too few values in struct initializer")
MSGDEF(E, CSLUL_E_LOOPENDWITHOUTBREAK, "loopend makes no sense after loop without \"break\"")
MSGDEF(E, CSLUL_E_LOOPEMPTYENDORDER, "loopempty must come before loopend")
MSGDEF(E, CSLUL_E_DUPLICATELOOPEMPTY, "Duplicate loopempty")
MSGDEF(E, CSLUL_E_DUPLICATELOOPEND, "Duplicate loopend")
MSGDEF(E, CSLUL_E_NOIN, "Expected \"in\" after loop variable")
MSGDEF(E, CSLUL_E_DUPLICATEGOTO, "goto target already exists")
MSGDEF(E, CSLUL_E_UNDEFINEDGOTO, "goto target not found")
MSGDEF(E, CSLUL_E_CASEEXPECTED, "Expected \"case\" after switch ... {")
MSGDEF(E, CSLUL_E_LCURLYEXPECTED, "Incorrect expression or missing {")
MSGDEF(E, CSLUL_E_LCURLYEXPECTEDONLY, "Missing {")
MSGDEF(E, CSLUL_E_CASEOUTSIDESWITCH, "\"case\" or \"default\" outside of \"switch\"")
MSGDEF(E, CSLUL_E_NOCOLONAFTERDEFAULT, "Colon expected after \"default\"")
MSGDEF(E, CSLUL_E_NOCASECOMMACOLON, "Must have , or : after \"case\" value")
MSGDEF(E, CSLUL_E_REPEATEDCASE, "Repeated \"case\"s are not allowed")
MSGDEF(E, CSLUL_E_SUBCASEOUTSIDECASE, "\"subcase\" outside of \"case\"")
MSGDEF(E, CSLUL_E_NONEWLINE, "Syntax error, or missing line break, before this symbol")
MSGDEF(E, CSLUL_E_NORETURNNEWLINE, "No line break after \"return\" in function without return value")
MSGDEF(E, CSLUL_E_NOCURLYSTMT, "Expected { before statement block")
MSGDEF(E, CSLUL_E_TOOMANYRCURLY, "Too many }")
MSGDEF(E, CSLUL_E_FINALRCURLYINDENTED, "Final } is indented")
MSGDEF(E, CSLUL_E_DUPLQUAL, "Duplicate type qualifier")
MSGDEF(E, CSLUL_E_BADIMPLQUAL, "Qualifier can only be used in module interfaces")
MSGDEF(E, CSLUL_E_DIRTRAILINGDOT, "Directory names may not end with a trailing dot")
MSGDEF(E, CSLUL_E_DEVICEFILENAME, "Filename is forbidden because it specifies a special device on Windows")
MSGDEF(E, CSLUL_E_DEVICEMODNAME, "Module name is forbidden because it is a special device filename on Windows")
MSGDEF(E, CSLUL_E_MISSINGVARIDENT, "Missing type or identifier before =")
MSGDEF(E, CSLUL_E_DECLMISSINGEQUALS, "Missing \"=\" between declaration and initial value")
MSGDEF(E, CSLUL_E_VARDEFINSIDELINE, "Variable definition detected inside line")
MSGDEF(E, CSLUL_E_BADSEMICOLON, "Semicolons should not be used")
MSGDEF(S, CSLUL_E_INDENTEDBLANKLINE, "Blank lines should not be indented")
MSGDEF(E, CSLUL_E_UNTERMINATEDSTRING, "Unterminated string (missing \")")
MSGDEF(E, CSLUL_E_IFACEIMPLDUPLICATE, "Name is already in use in interface")
MSGDEF(E, CSLUL_E_INLINEPLUSIMPL, "Function already defined with a function body in interface")
MSGDEF(E, CSLUL_E_CONSTANTWITHDATA, "\"data\" identifier already defined with a value in interface")
MSGDEF(E, CSLUL_E_MISSINGIMPLDEF, "No implementation of '%.*s' found in \\source files")
MSGDEF(E, CSLUL_E_MISSINGIMPLCLASS, "No implementation of '%.*s' found in \\source files (class '%.*s' does not exist there)")
MSGDEF(E, CSLUL_E_SELFDEPEND, "A module cannot depend on itself")
MSGDEF(E, CSLUL_E_DUPLICATEDEP, "Duplicate module among \\depends lines")
MSGDEF(E, CSLUL_E_BADDEPFLAG, "Unknown flag on \\depends line")
MSGDEF(E, CSLUL_E_BADIFACEDEPFLAG, "Unknown flag on \\interface_depends line (or misspelled \"since\")")
MSGDEF(E, CSLUL_E_DUPLDEPFLAG, "Duplicated flag on \\depends line")
MSGDEF(E, CSLUL_E_DUPLIFACEDEPFLAG, "Duplicated flag on \\interface_depends line")
MSGDEF(E, CSLUL_E_DEPFLAGSORDER, "Wrong order of flags on \\depends line")
MSGDEF(E, CSLUL_E_IFACEDEPFLAGSORDER, "Wrong order of flags on \\interface_depends line")
MSGDEF(E, CSLUL_E_IFACEDEPHIGHERTHANDEP, "\\interface_depends may not be higher than \\depends")
MSGDEF(E, CSLUL_E_DUPLENUMIDENT, "Duplicate enum identifier")
MSGDEF(E, CSLUL_E_ENUMCOMMA, "enums should not have commas between identifiers")
MSGDEF(E, CSLUL_E_ENUMEQUALSWITHOUTBASE, "enums can only have explicit \"= values\" if they have a base type")
MSGDEF(E, CSLUL_E_ENUMOUTSIDETYPEDEF, "enums can only be defined with \"type ... = enum { ... }\"")
MSGDEF(E, CSLUL_E_GENERICENUM, "enums cannot have type parameters")
MSGDEF(E, CSLUL_E_GENERICELEMENTARY, "Elementary types cannot have type parameters")
MSGDEF(E, CSLUL_E_APPWITHAPI, "Applications cannot have an API (missing \"\\type library\"?)")
MSGDEF(E, CSLUL_E_TOOMANYATTRPARAMS, "Too many parameters for this attribute")
MSGDEF(E, CSLUL_E_NODEPENDSVERSION, "Missing version number after \\depends")
MSGDEF(F, CSLUL_E_UNSUPPORTEDLANGVER, "Unsupported language version")
MSGDEF(E, CSLUL_E_BADLANGVERSYNTAX, "Bad syntax of \\slul attribute")
MSGDEF(E, CSLUL_E_DUPLICATEATTR, "Duplicate module attribute")
MSGDEF(E, CSLUL_E_MHNOBACKSLASH, "Module attributes should start with '\\'")
MSGDEF(E, CSLUL_E_MISSINGMODULEHEADER, "\"main.slul\" must start with module attributes (\\slul ...)")
MSGDEF(E, CSLUL_E_OPTIONALNONREF, "Only reference types can be optional")
MSGDEF(E, CSLUL_E_DUPLFUNCPARAM, "Duplicate name of function parameter")
MSGDEF(E, CSLUL_E_TOKENAFTEROPERATOR, "Unexpected symbol after operator")
MSGDEF(E, CSLUL_E_MISSINGDEP, "Module '%.*s' is not installed")
MSGDEF(E, CSLUL_E_OLDDEP, "Module '%.*s' is too old. At least version %.*s needs to be installed")
MSGDEF(E, CSLUL_E_VERNOTSUPPORTED, "Module '%.*s' doesn't support the requested version %.*s")
MSGDEF(E, CSLUL_E_NOIFACEDEPVERSION, "\\interface_depends lines must specify a version")
MSGDEF(E, CSLUL_E_NOSINCE, "Missing \"since\" keyword in module with stable API")
MSGDEF(E, CSLUL_E_NOSINCEVERSION, "Missing version number after \"since\"")
MSGDEF(E, CSLUL_E_SINCEWITHOUTMODVER, "\"since\" does not make sense in module without version")
MSGDEF(E, CSLUL_E_REPEATEDSINCE, "Repeated \"since\"")
MSGDEF(E, CSLUL_E_NESTEDSINCE, "\"since\" cannot appear in nested types")
MSGDEF(E, CSLUL_E_APPWITHIFACEDEP, "\\interface_depends is not applicable for this module type")
MSGDEF(E, CSLUL_E_DUPLICATEIFACEDEP, "Duplicate \\interface_depends line")
MSGDEF(E, CSLUL_E_IFACEDEPENDBUNDLED, "\\interface_depends may not be used with \\depends of type \"bundled\" in stable modules")
MSGDEF(E, CSLUL_E_TYPEPARAMNOCOMMA, "Expected , or > after type parameter")
MSGDEF(E, CSLUL_E_TOOMANYTYPEPARAMS, "Too many type parameters (maximum is 100)")
MSGDEF(E, CSLUL_E_EMPTYPARAMDEF, "Empty type parameter definition")
MSGDEF(E, CSLUL_E_BADPARAMTYPE, "Bad type parameter definition")
MSGDEF(E, CSLUL_E_PARAMDEFEND, "Missing , or > after type parameter name")
MSGDEF(E, CSLUL_E_VERSTRDOTDOT, "Repeated punctuation characters (\".+-_~\") in version")
MSGDEF(E, CSLUL_E_VERSTRDOTEND, "Versions may not end with a punctuation character (\".+-_~\")")
MSGDEF(E, CSLUL_E_APIDEFWITHOUTMODVER, "\\api_def requires \\version also")
MSGDEF(E, CSLUL_E_APIDEFUNSTABLE, "\\api_def cannot be used in unstable modules")
MSGDEF(E, CSLUL_E_MAXAPIDEFS, "Too many \\api_def lines. Maximum is 10k")
MSGDEF(E, CSLUL_E_BADAPIHASHLEN, "Wrong length of API hash. Should be 32 characters")
MSGDEF(E, CSLUL_E_BADAPIHASH, "Malformed base64 in API hash")
MSGDEF(E, CSLUL_E_DUPLICATEAPIDEF, "Duplicate \\api_def")
MSGDEF(E, CSLUL_E_IFACEDEPWITHOUTAPIDEF, "Missing \\api_def of version '%.*s', for which there is a since-version in '\\interface_depends %.*s'")
MSGDEF(E, CSLUL_E_SCRIPTESCAPEDUPL, "Duplicate (or overlapping) allowed scripts")
MSGDEF(E, CSLUL_E_SCRIPTESCAPEORDER, "Wrong order of allowed scripts. Correct order is \\LCGSO;")
MSGDEF(E, CSLUL_E_SCRIPTESCAPEBAD, "Missing escape sequence for \\, or missing ; after escape sequence with allowed scripts")
MSGDEF(E, CSLUL_E_SCRIPTESCAPEUNKNOWN, "Missing escape sequence for \\, or unknown \"allowed script\" character, or missing ;")
MSGDEF(E, CSLUL_E_SCRIPTLATIN, "Latin letters have been disallowed. Use \\L; to allow")
MSGDEF(E, CSLUL_E_SCRIPTCYRILLIC, "Use \\C; to allow Cyrillic letters")
MSGDEF(E, CSLUL_E_SCRIPTGREEK, "Use \\G; to allow Greek letters")
MSGDEF(E, CSLUL_E_SCRIPTSPECIALS, "Special character look-alikes have not been enabled. Use \\S; to allow")
MSGDEF(E, CSLUL_E_SCRIPTOTHER, "Use \\O; to allow \"other\" scripts/characters")
MSGDEF(E, CSLUL_E_SCRIPTRTL, "Strings with right-to-left scripts must be on a separate line")
MSGDEF(E, CSLUL_E_SOURCEMAINSLUL, "There should not be a \\source for main.slul")
MSGDEF(E, CSLUL_E_WRONGPARENTYPE, "Wrong type of right parenthesis, or mismatched parentheses")
MSGDEF(E, CSLUL_E_LIFETIMENONIDENTTOK, "Expected lifetime object (parameter name or \"return\")")
MSGDEF(E, CSLUL_E_LIFETIMENONGREATERTOK, "Invalid lifetime relation. Must be >=")
MSGDEF(E, CSLUL_E_LIFETIMESAMEPARAM, "Same parameter referenced twice in lifetime specification")
MSGDEF(E, CSLUL_E_LIFETIMEIDENTNOTFOUND, "Parameter does not exist (and symbol is not \"return\")")
MSGDEF(E, CSLUL_E_LIFETIMENONREF, "Non-reference type given in lifetime specification")
MSGDEF(E, CSLUL_E_PRIVATEINIMPL, "Private types (without \"= ...\") may only appear in interfaces")
MSGDEF(E, CSLUL_E_PRIVATENONSTRUCT, "Types in interface must be of struct type in implementation")
MSGDEF(E, CSLUL_E_APPWITHIMPLSLULVER, "\\slul attribute may not specify \"impl\" version for this module type")
MSGDEF(E, CSLUL_E_STABLEWITHOUTAPIDEF, "Module should be marked as \"\\version ... unstable_api\" if it has no \\api_def's")
MSGDEF(E, CSLUL_E_SLULIMPLVEROLDER, "\"impl\" version is older than the specified minimum version")
MSGDEF(E, CSLUL_E_SLULMAXVEROLDER, "\"upto\" version is older than the specified minimum or implementation version")
MSGDEF(F, CSLUL_E_UNSUPPORTEDIMPLLANGVER, "Unsupported language version in \"impl\" in \\slul")
MSGDEF(E, CSLUL_E_VERSTRZEROPREFIXED, "Versions may not start with a leading 0 (except when the version is 0.x)")
MSGDEF(E, CSLUL_E_BADTLDATAQUAL, "Qualifier is not allowed on global/top-level data objects")
MSGDEF(E, CSLUL_E_BADTLDATAREF, "References are not allowed as global/top-level data objects")
MSGDEF(E, CSLUL_E_IMPLDATAWITHOUTINITVAL, "Data object in implementation file must specify initial value")
MSGDEF(E, CSLUL_E_VERSIONEDINIMPL, "Symbol is versioned in implementation, but unversioned in interface")
MSGDEF(E, CSLUL_E_IMPLFUNCWITHOUTBODY, "Functions in implementation file must have a body")
MSGDEF(E, CSLUL_E_FUNCNOLCURLY, "Expected \"{\" before function body")
MSGDEF(E, CSLUL_E_FUNCNOARROW, "Expected \"->\" or valid keyword at end of function declaration")
MSGDEF(E, CSLUL_E_FUNCBADKEYWORD, "Unexpected symbol at end of function declaration")
MSGDEF(E, CSLUL_E_VERSIONWITHOUTAPIDEF, "Only libraries/plugins with \\api_def's can contain since versions")
MSGDEF(E, CSLUL_E_MISSINGVERWITHAPIDEF, "Symbol does not have \"since\" version, even though module has \\api_def's")
MSGDEF(E, CSLUL_E_SINCEVERSIONINIMPL, "since-versions should only go into the module interface (main.slul)")
MSGDEF(E, CSLUL_E_EMPTYSINCE, "since {} must contain at least one version")
MSGDEF(E, CSLUL_E_SAMEVERSION, "since version is identical to that of toplevel declaration, which is pointless")
MSGDEF(E, CSLUL_E_VERSIONEARLIERTHANDECL, "since version is earlier than that of toplevel declaration")
MSGDEF(E, CSLUL_E_SINCEVERNOTCHRONOLOGICAL, "struct/enum members do not come in chronological version order")
MSGDEF(E, CSLUL_E_NOTABACKPORT, "This is not a backport; the version wasn't released after the version to the left")
MSGDEF(E, CSLUL_E_VERSIONEDLOCALREF, "Local variables may not have a since version")
MSGDEF(E, CSLUL_E_NOSUCHVERSION, "No such version in this module")
MSGDEF(E, CSLUL_E_UNVERSIONEDAFTERVERSIONED, "All struct/enum members after a versioned one must also be versioned")
MSGDEF(E, CSLUL_E_QUALNOTALLOWED, "This type qualifier is not allowed here")
MSGDEF(E, CSLUL_E_NOQUALSONTYPE, "This type cannot have type qualifiers")
MSGDEF(E, CSLUL_E_AMBIGUOUSIDENT, "Identifier '%.*s' is defined in more than one module")
MSGDEF(E, CSLUL_E_AMBIGUOUSTYPEIDENT, "Type identifier '%.*s' in '%.*s' is defined in more than one module")
MSGDEF(N, CSLUL_E_SAMECLASSNAMEDIFFTYPE, "Regarding missing identifier '%.*s' in type '%.*s': A type with the same name also exists in module '%.*s'")
MSGDEF(E, CSLUL_E_TLTYPENOTDEF, "Type '%.*s' does not exist")
MSGDEF(E, CSLUL_E_TLIDENTNOTDEF, "Identifier '%.*s' does not exist")
MSGDEF(E, CSLUL_E_TLTYPETOONEW, "Type '%.*s' from module '%.*s' isn't available in version %.*s. It was added in %.*s")
MSGDEF(E, CSLUL_E_TLIDENTTOONEW, "Identifier '%.*s' from module '%.*s' isn't available in version %.*s. It was added in %.*s")
MSGDEF(E, CSLUL_E_TYPEIDENTTOONEW, "Identifier '%.*s' in '%.*s' from module '%.*s' isn't available in version %.*s. It was added in %.*s")
MSGDEF(E, CSLUL_E_FIELDTOONEW, "Field '%.*s' in '%.*s' from module '%.*s' isn't available in version %.*s. It was added in %.*s")
MSGDEF(E, CSLUL_E_TLTYPELATERLOWER, "Type '%.*s' from module '%.*s' isn't available in version %.*s. It was added in a more recent (although lower) version %.*s")
MSGDEF(E, CSLUL_E_TLIDENTLATERLOWER, "Identifier '%.*s' from module '%.*s' isn't available in version %.*s. It was added in a more recent (although lower) version %.*s")
MSGDEF(E, CSLUL_E_TYPEIDENTLATERLOWER, "Identifier '%.*s' in '%.*s' from module '%.*s' isn't available in version %.*s. It was added in a more recent (although lower) version %.*s")
MSGDEF(E, CSLUL_E_FIELDLATERLOWER, "Field '%.*s' in '%.*s' from module '%.*s' isn't available in version %.*s. It was added in a more recent (although lower) version %.*s")
MSGDEF(E, CSLUL_E_NOTYPESCOPEFUNC, "Return type has no type scope")
MSGDEF(E, CSLUL_E_NOTYPESCOPEDATA, "Type of data item has no type scope")
MSGDEF(E, CSLUL_E_BADFUNCIDENT, "Unexpected symbol after \"func\"")
MSGDEF(E, CSLUL_E_CLASSDOTTOKEN, "Unexpected symbol where function name was expected")
MSGDEF(E, CSLUL_E_UPPERFUNCNAME, "Function names should be in lower case")
MSGDEF(E, CSLUL_E_FUNCDEFIDENT, "Expected name, .name, or Class.name after \"func\"")
MSGDEF(E, CSLUL_E_THISOUTSIDEMETHOD, "\"this\" can only be used in methods of classes")
MSGDEF(E, CSLUL_E_NONPARAMETRICTYPE, "Type parameters are not applicable on this type")
MSGDEF(E, CSLUL_E_TYPEPARAMNONSLOT, "Type parameter variables can only be used in slots")
MSGDEF(E, CSLUL_E_PRIVATENONREF, "Private types can only be used in references")
MSGDEF(E, CSLUL_E_AMBIGUOUSEXPRTYPE, "Type of expression is not clear")
MSGDEF(E, CSLUL_E_CONSTEXPRBADOP, "Only constant operations can be used here")
MSGDEF(E, CSLUL_E_CYCLICDECL, "Cyclic reference in declaration")
MSGDEF(E, CSLUL_E_CYCLICTYPEDECL, "Cyclic type declaration without \"ref\" inside")
MSGDEF(E, CSLUL_E_VERIFYTOODEEP, "Too deep recursive declaration")
MSGDEF(E, CSLUL_E_IDENTNOTCOMPILETIME, "Identifier value is not known at compile-time")
MSGDEF(E, CSLUL_E_TYPESCOPENOTARGET, "No target type for .typescope")
MSGDEF(E, CSLUL_E_NOTYPESCOPE, "Target type has no .typescope")
MSGDEF(E, CSLUL_E_TYPEIDENTNOTFOUND, "\".%.*s\" does not exist in the target type")
MSGDEF(E, CSLUL_E_BADAPIDEFFLAG, "Unknown flag for \\api_def")
MSGDEF(E, CSLUL_E_LOWERCASETYPE, "Expected a type here, but types must start with UpperCase")
MSGDEF(E, CSLUL_E_VOIDNOTATYPE, "There is no \"void\" type. Please remove.")
MSGDEF(E, CSLUL_E_CAPITALIZEDNONTYPE, "Expected a non-type identifier here, but those are lower_case")
MSGDEF(E, CSLUL_E_TYPESNOTEQUAL, "Incompatible types. Nested types must match exactly")
MSGDEF(E, CSLUL_E_REFTYPESNOTEQUAL, "Incompatible references. Types must match exactly")
MSGDEF(E, CSLUL_E_REFREFTYPESNOTEQUAL, "Incompatible nested reference types")
MSGDEF(E, CSLUL_E_QUALSNOTEQUAL, "Incompatible nested reference types. Qualifiers must be exactly the same")
MSGDEF(E, CSLUL_E_QUALSNOTCOMPATIBLE, "Incompatible references. Qualifiers must be compatible")
MSGDEF(E, CSLUL_E_NAMEDTYPESMUSTBESAME, "Mismatch of named types")
MSGDEF(E, CSLUL_E_ACCESSPRIVATETYPE, "Cannot access inside of private type")
MSGDEF(E, CSLUL_E_INCOMPATIBLENESTEDTYPES, "Incompatible types. Nested type does not match")
MSGDEF(E, CSLUL_E_INCOMPATIBLETYPES, "Incompatible types")
MSGDEF(E, CSLUL_E_FIELDNONSTRUCT, "Left side of . is not of struct type")
MSGDEF(E, CSLUL_E_FIELDNOTFOUND, "Field \"%.*s\" does not exist")
MSGDEF(W, CSLUL_E_ASSERTTRUE, "\"assert true\" is meaningless")
MSGDEF(W, CSLUL_E_ALWAYSFALSE, "Expression is always false")
MSGDEF(W, CSLUL_E_ALWAYSTRUE, "Expression is always true")
MSGDEF(W, CSLUL_E_STMTSAFTERRETURN, "Unreachable statements after return")
MSGDEF(W, CSLUL_E_STMTSAFTERGOTO, "Unreachable statements after goto")
MSGDEF(W, CSLUL_E_AFTERWHILETRUE, "Unreachable statements after while true { }")
MSGDEF(W, CSLUL_E_AFTERDOWHILETRUE, "Unreachable statements after do { } while true")
MSGDEF(W, CSLUL_E_UNREACHABLESTMT, "Unreachable statement")
MSGDEF(E, CSLUL_E_NOMETHODNAMESPACE, "Left side of \".\" does not have a named type, so it has no method namespace")
MSGDEF(E, CSLUL_E_METHODNOTFOUND, "Method \"%.*s\" does not exist in type \"%.*s\"")
MSGDEF(E, CSLUL_E_METHODCONSTR, "Member is a constructor and not a method")
MSGDEF(E, CSLUL_E_NOTAMETHOD, "Not a method")
MSGDEF(E, CSLUL_E_NOTCALLABLE, "Left expression is not callable (missing operator?)")
MSGDEF(E, CSLUL_E_TOOMANYFUNCARGS, "Too many arguments to function")
MSGDEF(E, CSLUL_E_TOOFEWFUNCARGS, "Too few arguments to function")
MSGDEF(E, CSLUL_E_PARAMWRONGORDER, "Parameters come in the wrong order")
MSGDEF(E, CSLUL_E_PARAMNOTFOUND, "Parameter not found")
MSGDEF(F, CSLUL_E_NOHOSTTARGET, "This build of the compiler supports only cross-compilation. Please specify a target architecture with --target")
MSGDEF(E, CSLUL_E_FUNCLPAREN, "Expected ( after function name")
MSGDEF(E, CSLUL_E_STMTENDSHERE, "Error in statement (end of statement detected, but line continues)")
MSGDEF(E, CSLUL_E_VARNOTASSIGNED, "Variable is (or might be) unassigned at this point")
MSGDEF(E, CSLUL_E_VARNOTASSIGNGOTO, "Jumping to this goto target might unset a variable")
MSGDEF(E, CSLUL_E_VARMAYBENONE, "Variable might be 'none' at this point")
MSGDEF(E, CSLUL_E_CANTACCESSOPTIONAL, "Can't access value of optional type without none-check")
/* TODO goto variant? */
MSGDEF(E, CSLUL_E_FUNCMISSINGRETURN, "Function is missing a return value (in one or more cases)")
MSGDEF(E, CSLUL_E_ENDLESSWITHLOOPEMPTY, "loopempty is meaningless in endless loops")
MSGDEF(E, CSLUL_E_NOGOTOPREDECESSOR, "goto target has no clear predecessor")
MSGDEF(E, CSLUL_E_CANTTAKENONE, "Target type is not an type that can take a \"none\" value")
MSGDEF(E, CSLUL_E_TARGETTYPENOTARRAY, "Target type is not an array")
MSGDEF(E, CSLUL_E_TARGETTYPENOTSTRUCT, "Target type is not a struct")
MSGDEF(E, CSLUL_E_CASEAFTERDEFAULT, "\"case\" after \"default:\" case. \"default:\" must come last")
MSGDEF(E, CSLUL_E_DUPLICATEDEFAULT, "Duplicate \"default:\"")
MSGDEF(E, CSLUL_E_DIVBYZERO, "Division by zero")
MSGDEF(E, CSLUL_E_ARRAYVARIABLENESSDIFFER, "Incompatible types. Arrays have mixed variable/non-variable lengths")
MSGDEF(E, CSLUL_E_ARRAYLENGTHDIFFER, "Incompatible types. Array lengths differ")
MSGDEF(E, CSLUL_E_ARRAYLENGTUNKNOWN, "Incompatible types. Array types are incompatible due to length being unknown")
MSGDEF(E, CSLUL_E_FLOATTOINT, "Incompatible types. Floating point value cannot be placed in integer")
MSGDEF(E, CSLUL_E_SYSDEPTOFIXED, "Incompatible types. usize/ssize/fileoffs types have system-dependent range")
MSGDEF(E, CSLUL_E_FIXEDTOSYSDEP, "Incompatible types. usize/ssize/fileoffs types have system-dependent range (but at least 32 bits)")
MSGDEF(E, CSLUL_E_SIGNEDTOUNSIGNED, "Incompatible types. Target type does not accept signed types")
MSGDEF(E, CSLUL_E_NARROWERRANGE, "Incompatible types. Target type has shorter range")
MSGDEF(E, CSLUL_E_NUMREQUIREDBUTUNKNOWN, "Unknown target type. Numeric target type is required")
MSGDEF(E, CSLUL_E_NUMREQUIRED, "Numeric target type is required")
MSGDEF(E, CSLUL_E_OPNOEFFECT, "Operation has no effect")
MSGDEF(E, CSLUL_E_STRUCTSCOUNTDIFFER, "Struct types have different number of fields")
MSGDEF(E, CSLUL_E_TARGETTYPENOTCLOSED, "Cannot assign to non-closed struct (more fields could be added in future versions)")
MSGDEF(E, CSLUL_E_SUBEXPRTYPENOTCLOSED, "Cannot assign from non-closed struct (more fields could be added in future versions)")
MSGDEF(E, CSLUL_E_VERSIONEDCLOSEDTYPE, "closed types cannot have since-versions inside")
MSGDEF(E, CSLUL_E_EXPECTEDVERORRCURLY, "Expected version or }")
MSGDEF(E, CSLUL_E_OPENWITHOUTREF, "Open types can only be used inside a \"ref\"")
MSGDEF(E, CSLUL_E_OPENTLDATA, "Open types cannot be used in top-level data items")
MSGDEF(E, CSLUL_E_STRUCTSOPEN, "Open structs cannot be passed by value (both source and destination are open types)")
MSGDEF(E, CSLUL_E_STRUCTTARGETOPEN, "Open structs cannot be passed by value (destination struct is an open type)")
MSGDEF(E, CSLUL_E_STRUCTSOURCEOPEN, "Open structs cannot be passed by value (source struct is an open type)")
MSGDEF(E, CSLUL_E_DEREFNONREF, "Not a reference")
MSGDEF(E, CSLUL_E_TARGETNOTREF, "Reference not expected")
MSGDEF(E, CSLUL_E_SLOTNONTYPEPARAM, "Slot types can only contain type parameters")
MSGDEF(E, CSLUL_E_TYPEPARAMWITHOUTSLOT, "Type parameters can only be used within \"slot\" types")
MSGDEF(E, CSLUL_E_TYPEPARAMNOTFOUND, "Type parameter does not exist")
MSGDEF(E, CSLUL_E_MLCOMMENTNOTCLOSED, "Multi-line comment not closed with #}}")
MSGDEF(E, CSLUL_E_MLCOMMENTNOTLINESTART, "Multi-line comment #{{ must begin at start of line")
MSGDEF(E, CSLUL_E_MODNAMEMISMATCH, "\"\\name %.*s\" in library interface does not match filename")
MSGDEF(E, CSLUL_E_BADLIBRARYTYPE, "Unexpected value of \\type in library interface")
MSGDEF(E, CSLUL_E_REQUIREDDEP, "A dependency on '%.*s' (>= %.*s) is required, since '%.*s' \\interface_depends on it")
MSGDEF(E, CSLUL_E_REQUIREDDEPVER, "The dependency '%.*s' must have version >= %.*s, since '%.*s' \\interface_depends on that version. The current version is %.*s")
MSGDEF(E, CSLUL_E_REQUIREDDEPVERSELF, "The current module '%.*s' must have version >= %.*s, since '%.*s' \\interface_depends on that version. The current version is %.*s")
MSGDEF(E, CSLUL_E_MISSINGNESTEDONLY, "\\interface_depends must have 'nestedonly' when \\depends does")
MSGDEF(E, CSLUL_E_IFACEDEPFLAGSCHANGE, "Flags in \\interface_depends differs from previous \\interface_depends")
MSGDEF(S, CSLUL_E_CRNEWLINE, "Files should use LF (\"Unix\") or CR+LF (\"Windows\") newlines, not CR (\"Mac OS Classic\")")
MSGDEF(E, CSLUL_E_BADVERSIONFLAG, "Invalid flag to \\version")
MSGDEF(E, CSLUL_E_APPWITHOUTMAIN, "SlulApp.main is missing in application")
MSGDEF(E, CSLUL_E_MAINMALFORMED, "SlulApp.main has an incorrect function signature")
MSGDEF(E, CSLUL_E_MAINNOTAPP, "SlulApp.main can only appear in applications")
MSGDEF(E, CSLUL_E_DOUBLEUNDERSCORE, "Identifiers may not start with double underscores \"__\"")
MSGDEF(E, CSLUL_E_TYPEUNDERSCORE, "Types may not contain underscores \"_\"")