Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: pkg/front_end/lib/src/fasta/fasta_codes_generated.dart

Issue 2778213002: Use message.yaml in parser. (Closed)
Patch Set: Update subpackage relationships. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
6 //
7 // Instead modify 'pkg/front_end/messages.yaml' and run
8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update.
9
10 part of fasta.codes;
11
12 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
13 const FastaCode<_ExpectedClassBodyToSkip> codeExpectedClassBodyToSkip =
14 const FastaCode<_ExpectedClassBodyToSkip>(
15 template: r"Expected a class body, but got '#lexeme'.",
16 dart2jsCode: "FASTA_FATAL",
17 format: _formatExpectedClassBodyToSkip);
18
19 typedef FastaMessage _ExpectedClassBodyToSkip(
20 Uri uri, int charOffset, Token token);
21
22 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
23 FastaMessage _formatExpectedClassBodyToSkip(
24 Uri uri, int charOffset, Token token) {
25 String lexeme = token.lexeme;
26 return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip,
27 message: "Expected a class body, but got '$lexeme'.",
28 arguments: {'token': token});
29 }
30
31 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
32 const FastaCode<_StackOverflow> codeStackOverflow =
33 const FastaCode<_StackOverflow>(
34 template: r"Stack overflow.",
35 dart2jsCode: "GENERIC",
36 format: _formatStackOverflow);
37
38 typedef FastaMessage _StackOverflow(Uri uri, int charOffset);
39
40 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
41 FastaMessage _formatStackOverflow(Uri uri, int charOffset) {
42 return new FastaMessage(uri, charOffset, codeStackOverflow,
43 message: "Stack overflow.", arguments: {});
44 }
45
46 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
47 const FastaCode<_UnexpectedToken> codeUnexpectedToken =
48 const FastaCode<_UnexpectedToken>(
49 template: r"Unexpected token '#lexeme'.",
50 dart2jsCode: "FASTA_FATAL",
51 format: _formatUnexpectedToken);
52
53 typedef FastaMessage _UnexpectedToken(Uri uri, int charOffset, Token token);
54
55 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
56 FastaMessage _formatUnexpectedToken(Uri uri, int charOffset, Token token) {
57 String lexeme = token.lexeme;
58 return new FastaMessage(uri, charOffset, codeUnexpectedToken,
59 message: "Unexpected token '$lexeme'.", arguments: {'token': token});
60 }
61
62 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
63 const FastaCode<_AwaitAsIdentifier> codeAwaitAsIdentifier = const FastaCode<
64 _AwaitAsIdentifier>(
65 template:
66 r"'await' can't be used as an identifier in 'async', 'async*', or 'sync* ' methods.",
67 dart2jsCode: "FASTA_IGNORED",
68 format: _formatAwaitAsIdentifier);
69
70 typedef FastaMessage _AwaitAsIdentifier(Uri uri, int charOffset);
71
72 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
73 FastaMessage _formatAwaitAsIdentifier(Uri uri, int charOffset) {
74 return new FastaMessage(uri, charOffset, codeAwaitAsIdentifier,
75 message:
76 "'await' can't be used as an identifier in 'async', 'async*', or 'sync *' methods.",
77 arguments: {});
78 }
79
80 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
81 const FastaCode<_FactoryNotSync> codeFactoryNotSync =
82 const FastaCode<_FactoryNotSync>(
83 template: r"Factories can't use 'async', 'async*', or 'sync*'.",
84 dart2jsCode: "FASTA_IGNORED",
85 format: _formatFactoryNotSync);
86
87 typedef FastaMessage _FactoryNotSync(Uri uri, int charOffset);
88
89 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
90 FastaMessage _formatFactoryNotSync(Uri uri, int charOffset) {
91 return new FastaMessage(uri, charOffset, codeFactoryNotSync,
92 message: "Factories can't use 'async', 'async*', or 'sync*'.",
93 arguments: {});
94 }
95
96 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
97 const FastaCode<_YieldNotGenerator> codeYieldNotGenerator =
98 const FastaCode<_YieldNotGenerator>(
99 template: r"'yield' can only be used in 'sync*' or 'async*' methods.",
100 dart2jsCode: "FASTA_IGNORED",
101 format: _formatYieldNotGenerator);
102
103 typedef FastaMessage _YieldNotGenerator(Uri uri, int charOffset);
104
105 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
106 FastaMessage _formatYieldNotGenerator(Uri uri, int charOffset) {
107 return new FastaMessage(uri, charOffset, codeYieldNotGenerator,
108 message: "'yield' can only be used in 'sync*' or 'async*' methods.",
109 arguments: {});
110 }
111
112 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
113 const FastaCode<_SetterNotSync> codeSetterNotSync =
114 const FastaCode<_SetterNotSync>(
115 template: r"Setters can't use 'async', 'async*', or 'sync*'.",
116 dart2jsCode: "FASTA_IGNORED",
117 format: _formatSetterNotSync);
118
119 typedef FastaMessage _SetterNotSync(Uri uri, int charOffset);
120
121 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
122 FastaMessage _formatSetterNotSync(Uri uri, int charOffset) {
123 return new FastaMessage(uri, charOffset, codeSetterNotSync,
124 message: "Setters can't use 'async', 'async*', or 'sync*'.",
125 arguments: {});
126 }
127
128 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
129 const FastaCode<_NonAsciiWhitespace> codeNonAsciiWhitespace = const FastaCode<
130 _NonAsciiWhitespace>(
131 template:
132 r"The non-ASCII space character #unicode can only be used in strings and comments.",
133 analyzerCode: "ILLEGAL_CHARACTER",
134 dart2jsCode: "BAD_INPUT_CHARACTER",
135 format: _formatNonAsciiWhitespace);
136
137 typedef FastaMessage _NonAsciiWhitespace(
138 Uri uri, int charOffset, int codePoint);
139
140 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
141 FastaMessage _formatNonAsciiWhitespace(Uri uri, int charOffset, int codePoint) {
142 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
143 return new FastaMessage(uri, charOffset, codeNonAsciiWhitespace,
144 message:
145 "The non-ASCII space character $unicode can only be used in strings an d comments.",
146 arguments: {'codePoint': codePoint});
147 }
148
149 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
150 const FastaCode<_ExpectedIdentifier> codeExpectedIdentifier =
151 const FastaCode<_ExpectedIdentifier>(
152 template: r"'#lexeme' is a reserved word and can't be used here.",
153 tip: r"Try using a different name.",
154 dart2jsCode: "EXPECTED_IDENTIFIER",
155 format: _formatExpectedIdentifier);
156
157 typedef FastaMessage _ExpectedIdentifier(Uri uri, int charOffset, Token token);
158
159 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
160 FastaMessage _formatExpectedIdentifier(Uri uri, int charOffset, Token token) {
161 String lexeme = token.lexeme;
162 return new FastaMessage(uri, charOffset, codeExpectedIdentifier,
163 message: "'$lexeme' is a reserved word and can't be used here.",
164 tip: "Try using a different name.",
165 arguments: {'token': token});
166 }
167
168 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
169 const FastaCode<_ExpectedBlockToSkip> codeExpectedBlockToSkip =
170 const FastaCode<_ExpectedBlockToSkip>(
171 template: r"Expected a function body or '=>'.",
172 tip: r"Try adding {}.",
173 dart2jsCode: "NATIVE_OR_BODY_EXPECTED",
174 format: _formatExpectedBlockToSkip);
175
176 typedef FastaMessage _ExpectedBlockToSkip(Uri uri, int charOffset);
177
178 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
179 FastaMessage _formatExpectedBlockToSkip(Uri uri, int charOffset) {
180 return new FastaMessage(uri, charOffset, codeExpectedBlockToSkip,
181 message: "Expected a function body or '=>'.",
182 tip: "Try adding {}.",
183 arguments: {});
184 }
185
186 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
187 const FastaCode<
188 _RequiredParameterWithDefault> codeRequiredParameterWithDefault =
189 const FastaCode<_RequiredParameterWithDefault>(
190 template: r"Non-optional parameters can't have a default value.",
191 tip:
192 r"Try removing the default value or making the parameter optional.",
193 dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT",
194 format: _formatRequiredParameterWithDefault);
195
196 typedef FastaMessage _RequiredParameterWithDefault(Uri uri, int charOffset);
197
198 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
199 FastaMessage _formatRequiredParameterWithDefault(Uri uri, int charOffset) {
200 return new FastaMessage(uri, charOffset, codeRequiredParameterWithDefault,
201 message: "Non-optional parameters can't have a default value.",
202 tip: "Try removing the default value or making the parameter optional.",
203 arguments: {});
204 }
205
206 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
207 const FastaCode<_Unspecified> codeUnspecified = const FastaCode<_Unspecified>(
208 template: r"#string", dart2jsCode: "GENERIC", format: _formatUnspecified);
209
210 typedef FastaMessage _Unspecified(Uri uri, int charOffset, String string);
211
212 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
213 FastaMessage _formatUnspecified(Uri uri, int charOffset, String string) {
214 return new FastaMessage(uri, charOffset, codeUnspecified,
215 message: "$string", arguments: {'string': string});
216 }
217
218 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
219 const FastaCode<_MissingExponent> codeMissingExponent = const FastaCode<
220 _MissingExponent>(
221 template:
222 r"Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).",
223 tip:
224 r"Make sure there is an exponent, and remove any whitespace before it.",
225 analyzerCode: "MISSING_DIGIT",
226 dart2jsCode: "EXPONENT_MISSING",
227 format: _formatMissingExponent);
228
229 typedef FastaMessage _MissingExponent(Uri uri, int charOffset);
230
231 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
232 FastaMessage _formatMissingExponent(Uri uri, int charOffset) {
233 return new FastaMessage(uri, charOffset, codeMissingExponent,
234 message:
235 "Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).",
236 tip:
237 "Make sure there is an exponent, and remove any whitespace before it." ,
238 arguments: {});
239 }
240
241 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
242 const FastaCode<_PositionalParameterWithEquals>
243 codePositionalParameterWithEquals =
244 const FastaCode<_PositionalParameterWithEquals>(
245 template:
246 r"Positional optional parameters can't use ':' to specify a default value.",
247 tip: r"Try replacing ':' with '='.",
248 dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS",
249 format: _formatPositionalParameterWithEquals);
250
251 typedef FastaMessage _PositionalParameterWithEquals(Uri uri, int charOffset);
252
253 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
254 FastaMessage _formatPositionalParameterWithEquals(Uri uri, int charOffset) {
255 return new FastaMessage(uri, charOffset, codePositionalParameterWithEquals,
256 message:
257 "Positional optional parameters can't use ':' to specify a default val ue.",
258 tip: "Try replacing ':' with '='.",
259 arguments: {});
260 }
261
262 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
263 const FastaCode<
264 _UnexpectedDollarInString> codeUnexpectedDollarInString = const FastaCode<
265 _UnexpectedDollarInString>(
266 template:
267 r"A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).",
268 tip: r"Try adding a backslash (\) to escape the '$'.",
269 dart2jsCode: "MALFORMED_STRING_LITERAL",
270 format: _formatUnexpectedDollarInString);
271
272 typedef FastaMessage _UnexpectedDollarInString(Uri uri, int charOffset);
273
274 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
275 FastaMessage _formatUnexpectedDollarInString(Uri uri, int charOffset) {
276 return new FastaMessage(uri, charOffset, codeUnexpectedDollarInString,
277 message:
278 "A '\$' has special meaning inside a string, and must be followed by a n identifier or an expression in curly braces ({}).",
279 tip: "Try adding a backslash (\) to escape the '\$'.",
280 arguments: {});
281 }
282
283 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
284 const FastaCode<_ExtraneousModifier> codeExtraneousModifier =
285 const FastaCode<_ExtraneousModifier>(
286 template: r"Can't have modifier '#lexeme' here.",
287 tip: r"Try removing '#lexeme'.",
288 dart2jsCode: "EXTRANEOUS_MODIFIER",
289 format: _formatExtraneousModifier);
290
291 typedef FastaMessage _ExtraneousModifier(Uri uri, int charOffset, Token token);
292
293 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
294 FastaMessage _formatExtraneousModifier(Uri uri, int charOffset, Token token) {
295 String lexeme = token.lexeme;
296 return new FastaMessage(uri, charOffset, codeExtraneousModifier,
297 message: "Can't have modifier '$lexeme' here.",
298 tip: "Try removing '$lexeme'.",
299 arguments: {'token': token});
300 }
301
302 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
303 const FastaCode<_EmptyOptionalParameterList> codeEmptyOptionalParameterList =
304 const FastaCode<_EmptyOptionalParameterList>(
305 template: r"Optional parameter lists cannot be empty.",
306 tip: r"Try adding an optional parameter to the list.",
307 dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST",
308 format: _formatEmptyOptionalParameterList);
309
310 typedef FastaMessage _EmptyOptionalParameterList(Uri uri, int charOffset);
311
312 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
313 FastaMessage _formatEmptyOptionalParameterList(Uri uri, int charOffset) {
314 return new FastaMessage(uri, charOffset, codeEmptyOptionalParameterList,
315 message: "Optional parameter lists cannot be empty.",
316 tip: "Try adding an optional parameter to the list.",
317 arguments: {});
318 }
319
320 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
321 const FastaCode<_UnterminatedString> codeUnterminatedString =
322 const FastaCode<_UnterminatedString>(
323 template: r"String must end with #string.",
324 analyzerCode: "UNTERMINATED_STRING_LITERAL",
325 dart2jsCode: "UNTERMINATED_STRING",
326 format: _formatUnterminatedString);
327
328 typedef FastaMessage _UnterminatedString(
329 Uri uri, int charOffset, String string);
330
331 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
332 FastaMessage _formatUnterminatedString(Uri uri, int charOffset, String string) {
333 return new FastaMessage(uri, charOffset, codeUnterminatedString,
334 message: "String must end with $string.", arguments: {'string': string});
335 }
336
337 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
338 const FastaCode<_AwaitNotAsync> codeAwaitNotAsync =
339 const FastaCode<_AwaitNotAsync>(
340 template: r"'await' can only be used in 'async' or 'async*' methods.",
341 dart2jsCode: "FASTA_IGNORED",
342 format: _formatAwaitNotAsync);
343
344 typedef FastaMessage _AwaitNotAsync(Uri uri, int charOffset);
345
346 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
347 FastaMessage _formatAwaitNotAsync(Uri uri, int charOffset) {
348 return new FastaMessage(uri, charOffset, codeAwaitNotAsync,
349 message: "'await' can only be used in 'async' or 'async*' methods.",
350 arguments: {});
351 }
352
353 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
354 const FastaCode<_ExpectedFunctionBody> codeExpectedFunctionBody =
355 const FastaCode<_ExpectedFunctionBody>(
356 template: r"Expected a function body, but got '#lexeme'.",
357 dart2jsCode: "NATIVE_OR_FATAL",
358 format: _formatExpectedFunctionBody);
359
360 typedef FastaMessage _ExpectedFunctionBody(
361 Uri uri, int charOffset, Token token);
362
363 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
364 FastaMessage _formatExpectedFunctionBody(Uri uri, int charOffset, Token token) {
365 String lexeme = token.lexeme;
366 return new FastaMessage(uri, charOffset, codeExpectedFunctionBody,
367 message: "Expected a function body, but got '$lexeme'.",
368 arguments: {'token': token});
369 }
370
371 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
372 const FastaCode<_ExpectedHexDigit> codeExpectedHexDigit =
373 const FastaCode<_ExpectedHexDigit>(
374 template: r"A hex digit (0-9 or A-F) must follow '0x'.",
375 analyzerCode: "MISSING_HEX_DIGIT",
376 dart2jsCode: "HEX_DIGIT_EXPECTED",
377 format: _formatExpectedHexDigit);
378
379 typedef FastaMessage _ExpectedHexDigit(Uri uri, int charOffset);
380
381 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
382 FastaMessage _formatExpectedHexDigit(Uri uri, int charOffset) {
383 return new FastaMessage(uri, charOffset, codeExpectedHexDigit,
384 message: "A hex digit (0-9 or A-F) must follow '0x'.", arguments: {});
385 }
386
387 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
388 const FastaCode<_EmptyNamedParameterList> codeEmptyNamedParameterList =
389 const FastaCode<_EmptyNamedParameterList>(
390 template: r"Named parameter lists cannot be empty.",
391 tip: r"Try adding a named parameter to the list.",
392 dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST",
393 format: _formatEmptyNamedParameterList);
394
395 typedef FastaMessage _EmptyNamedParameterList(Uri uri, int charOffset);
396
397 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
398 FastaMessage _formatEmptyNamedParameterList(Uri uri, int charOffset) {
399 return new FastaMessage(uri, charOffset, codeEmptyNamedParameterList,
400 message: "Named parameter lists cannot be empty.",
401 tip: "Try adding a named parameter to the list.",
402 arguments: {});
403 }
404
405 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
406 const FastaCode<_UnsupportedPrefixPlus> codeUnsupportedPrefixPlus =
407 const FastaCode<_UnsupportedPrefixPlus>(
408 template: r"'+' is not a prefix operator. ",
409 tip: r"Try removing '+'.",
410 dart2jsCode: "UNSUPPORTED_PREFIX_PLUS",
411 format: _formatUnsupportedPrefixPlus);
412
413 typedef FastaMessage _UnsupportedPrefixPlus(Uri uri, int charOffset);
414
415 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
416 FastaMessage _formatUnsupportedPrefixPlus(Uri uri, int charOffset) {
417 return new FastaMessage(uri, charOffset, codeUnsupportedPrefixPlus,
418 message: "'+' is not a prefix operator. ",
419 tip: "Try removing '+'.",
420 arguments: {});
421 }
422
423 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
424 const FastaCode<_ExpectedString> codeExpectedString =
425 const FastaCode<_ExpectedString>(
426 template: r"Expected a String, but got '#lexeme'.",
427 dart2jsCode: "FASTA_FATAL",
428 format: _formatExpectedString);
429
430 typedef FastaMessage _ExpectedString(Uri uri, int charOffset, Token token);
431
432 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
433 FastaMessage _formatExpectedString(Uri uri, int charOffset, Token token) {
434 String lexeme = token.lexeme;
435 return new FastaMessage(uri, charOffset, codeExpectedString,
436 message: "Expected a String, but got '$lexeme'.",
437 arguments: {'token': token});
438 }
439
440 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
441 const FastaCode<_AbstractNotSync> codeAbstractNotSync =
442 const FastaCode<_AbstractNotSync>(
443 template: r"Abstract methods can't use 'async', 'async*', or 'sync*'.",
444 dart2jsCode: "FASTA_IGNORED",
445 format: _formatAbstractNotSync);
446
447 typedef FastaMessage _AbstractNotSync(Uri uri, int charOffset);
448
449 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
450 FastaMessage _formatAbstractNotSync(Uri uri, int charOffset) {
451 return new FastaMessage(uri, charOffset, codeAbstractNotSync,
452 message: "Abstract methods can't use 'async', 'async*', or 'sync*'.",
453 arguments: {});
454 }
455
456 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
457 const FastaCode<_ExpectedDeclaration> codeExpectedDeclaration =
458 const FastaCode<_ExpectedDeclaration>(
459 template: r"Expected a declaration, but got '#lexeme'.",
460 dart2jsCode: "FASTA_FATAL",
461 format: _formatExpectedDeclaration);
462
463 typedef FastaMessage _ExpectedDeclaration(Uri uri, int charOffset, Token token);
464
465 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
466 FastaMessage _formatExpectedDeclaration(Uri uri, int charOffset, Token token) {
467 String lexeme = token.lexeme;
468 return new FastaMessage(uri, charOffset, codeExpectedDeclaration,
469 message: "Expected a declaration, but got '$lexeme'.",
470 arguments: {'token': token});
471 }
472
473 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
474 const FastaCode<
475 _AsciiControlCharacter> codeAsciiControlCharacter = const FastaCode<
476 _AsciiControlCharacter>(
477 template:
478 r"The control character #unicode can only be used in strings and comment s.",
479 dart2jsCode: "BAD_INPUT_CHARACTER",
480 format: _formatAsciiControlCharacter);
481
482 typedef FastaMessage _AsciiControlCharacter(
483 Uri uri, int charOffset, int codePoint);
484
485 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
486 FastaMessage _formatAsciiControlCharacter(
487 Uri uri, int charOffset, int codePoint) {
488 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
489 return new FastaMessage(uri, charOffset, codeAsciiControlCharacter,
490 message:
491 "The control character $unicode can only be used in strings and commen ts.",
492 arguments: {'codePoint': codePoint});
493 }
494
495 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
496 const FastaCode<_UnmatchedToken> codeUnmatchedToken =
497 const FastaCode<_UnmatchedToken>(
498 template: r"Can't find '#string' to match '#lexeme'.",
499 dart2jsCode: "UNMATCHED_TOKEN",
500 format: _formatUnmatchedToken);
501
502 typedef FastaMessage _UnmatchedToken(
503 Uri uri, int charOffset, String string, Token token);
504
505 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
506 FastaMessage _formatUnmatchedToken(
507 Uri uri, int charOffset, String string, Token token) {
508 String lexeme = token.lexeme;
509 return new FastaMessage(uri, charOffset, codeUnmatchedToken,
510 message: "Can't find '$string' to match '$lexeme'.",
511 arguments: {'string': string, 'token': token});
512 }
513
514 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
515 const FastaCode<_InvalidSyncModifier> codeInvalidSyncModifier =
516 const FastaCode<_InvalidSyncModifier>(
517 template: r"Invalid modifier 'sync'.",
518 tip: r"Try replacing 'sync' with 'sync*'.",
519 dart2jsCode: "INVALID_SYNC_MODIFIER",
520 format: _formatInvalidSyncModifier);
521
522 typedef FastaMessage _InvalidSyncModifier(Uri uri, int charOffset);
523
524 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
525 FastaMessage _formatInvalidSyncModifier(Uri uri, int charOffset) {
526 return new FastaMessage(uri, charOffset, codeInvalidSyncModifier,
527 message: "Invalid modifier 'sync'.",
528 tip: "Try replacing 'sync' with 'sync*'.",
529 arguments: {});
530 }
531
532 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
533 const FastaCode<_ExpectedOpenParens> codeExpectedOpenParens =
534 const FastaCode<_ExpectedOpenParens>(
535 template: r"Expected '('.",
536 dart2jsCode: "GENERIC",
537 format: _formatExpectedOpenParens);
538
539 typedef FastaMessage _ExpectedOpenParens(Uri uri, int charOffset);
540
541 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
542 FastaMessage _formatExpectedOpenParens(Uri uri, int charOffset) {
543 return new FastaMessage(uri, charOffset, codeExpectedOpenParens,
544 message: "Expected '('.", arguments: {});
545 }
546
547 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
548 const FastaCode<_UnterminatedComment> codeUnterminatedComment =
549 const FastaCode<_UnterminatedComment>(
550 template: r"Comment starting with '/*' must end with '*/'.",
551 analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT",
552 dart2jsCode: "UNTERMINATED_COMMENT",
553 format: _formatUnterminatedComment);
554
555 typedef FastaMessage _UnterminatedComment(Uri uri, int charOffset);
556
557 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
558 FastaMessage _formatUnterminatedComment(Uri uri, int charOffset) {
559 return new FastaMessage(uri, charOffset, codeUnterminatedComment,
560 message: "Comment starting with '/*' must end with '*/'.", arguments: {});
561 }
562
563 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
564 const FastaCode<_ExpectedClassBody> codeExpectedClassBody =
565 const FastaCode<_ExpectedClassBody>(
566 template: r"Expected a class body, but got '#lexeme'.",
567 dart2jsCode: "FASTA_FATAL",
568 format: _formatExpectedClassBody);
569
570 typedef FastaMessage _ExpectedClassBody(Uri uri, int charOffset, Token token);
571
572 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
573 FastaMessage _formatExpectedClassBody(Uri uri, int charOffset, Token token) {
574 String lexeme = token.lexeme;
575 return new FastaMessage(uri, charOffset, codeExpectedClassBody,
576 message: "Expected a class body, but got '$lexeme'.",
577 arguments: {'token': token});
578 }
579
580 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
581 const FastaCode<_ExpectedExpression> codeExpectedExpression =
582 const FastaCode<_ExpectedExpression>(
583 template: r"Expected an expression, but got '#lexeme'.",
584 dart2jsCode: "FASTA_FATAL",
585 format: _formatExpectedExpression);
586
587 typedef FastaMessage _ExpectedExpression(Uri uri, int charOffset, Token token);
588
589 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
590 FastaMessage _formatExpectedExpression(Uri uri, int charOffset, Token token) {
591 String lexeme = token.lexeme;
592 return new FastaMessage(uri, charOffset, codeExpectedExpression,
593 message: "Expected an expression, but got '$lexeme'.",
594 arguments: {'token': token});
595 }
596
597 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
598 const FastaCode<_InvalidAwaitFor> codeInvalidAwaitFor = const FastaCode<
599 _InvalidAwaitFor>(
600 template:
601 r"'await' is only supported in methods with an 'async' or 'async*' body modifier.",
602 tip:
603 r"Try adding 'async' or 'async*' to the method body or removing the 'awa it' keyword.",
604 dart2jsCode: "INVALID_AWAIT_FOR",
605 format: _formatInvalidAwaitFor);
606
607 typedef FastaMessage _InvalidAwaitFor(Uri uri, int charOffset);
608
609 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
610 FastaMessage _formatInvalidAwaitFor(Uri uri, int charOffset) {
611 return new FastaMessage(uri, charOffset, codeInvalidAwaitFor,
612 message:
613 "'await' is only supported in methods with an 'async' or 'async*' body modifier.",
614 tip:
615 "Try adding 'async' or 'async*' to the method body or removing the 'aw ait' keyword.",
616 arguments: {});
617 }
618
619 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
620 const FastaCode<_ExpectedType> codeExpectedType =
621 const FastaCode<_ExpectedType>(
622 template: r"Expected a type, but got '#lexeme'.",
623 dart2jsCode: "FASTA_FATAL",
624 format: _formatExpectedType);
625
626 typedef FastaMessage _ExpectedType(Uri uri, int charOffset, Token token);
627
628 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
629 FastaMessage _formatExpectedType(Uri uri, int charOffset, Token token) {
630 String lexeme = token.lexeme;
631 return new FastaMessage(uri, charOffset, codeExpectedType,
632 message: "Expected a type, but got '$lexeme'.",
633 arguments: {'token': token});
634 }
635
636 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
637 const FastaCode<_UnterminatedToken> codeUnterminatedToken =
638 const FastaCode<_UnterminatedToken>(
639 template: r"Incomplete token.",
640 dart2jsCode: "UNTERMINATED_TOKEN",
641 format: _formatUnterminatedToken);
642
643 typedef FastaMessage _UnterminatedToken(Uri uri, int charOffset);
644
645 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
646 FastaMessage _formatUnterminatedToken(Uri uri, int charOffset) {
647 return new FastaMessage(uri, charOffset, codeUnterminatedToken,
648 message: "Incomplete token.", arguments: {});
649 }
650
651 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
652 const FastaCode<_ExpectedButGot> codeExpectedButGot =
653 const FastaCode<_ExpectedButGot>(
654 template: r"Expected '#string' before this.",
655 tip: r"DONT_KNOW_HOW_TO_FIX,",
656 dart2jsCode: "MISSING_TOKEN_BEFORE_THIS",
657 format: _formatExpectedButGot);
658
659 typedef FastaMessage _ExpectedButGot(Uri uri, int charOffset, String string);
660
661 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
662 FastaMessage _formatExpectedButGot(Uri uri, int charOffset, String string) {
663 return new FastaMessage(uri, charOffset, codeExpectedButGot,
664 message: "Expected '$string' before this.",
665 tip: "DONT_KNOW_HOW_TO_FIX,",
666 arguments: {'string': string});
667 }
668
669 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
670 const FastaCode<_AwaitForNotAsync> codeAwaitForNotAsync = const FastaCode<
671 _AwaitForNotAsync>(
672 template:
673 r"Asynchronous for-loop can only be used in 'async' or 'async*' methods. ",
674 dart2jsCode: "FASTA_IGNORED",
675 format: _formatAwaitForNotAsync);
676
677 typedef FastaMessage _AwaitForNotAsync(Uri uri, int charOffset);
678
679 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
680 FastaMessage _formatAwaitForNotAsync(Uri uri, int charOffset) {
681 return new FastaMessage(uri, charOffset, codeAwaitForNotAsync,
682 message:
683 "Asynchronous for-loop can only be used in 'async' or 'async*' methods .",
684 arguments: {});
685 }
686
687 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
688 const FastaCode<_Encoding> codeEncoding = const FastaCode<_Encoding>(
689 template: r"Unable to decode bytes as UTF-8.",
690 dart2jsCode: "FASTA_FATAL",
691 format: _formatEncoding);
692
693 typedef FastaMessage _Encoding(Uri uri, int charOffset);
694
695 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
696 FastaMessage _formatEncoding(Uri uri, int charOffset) {
697 return new FastaMessage(uri, charOffset, codeEncoding,
698 message: "Unable to decode bytes as UTF-8.", arguments: {});
699 }
700
701 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
702 const FastaCode<_AsyncAsIdentifier> codeAsyncAsIdentifier = const FastaCode<
703 _AsyncAsIdentifier>(
704 template:
705 r"'async' can't be used as an identifier in 'async', 'async*', or 'sync* ' methods.",
706 analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
707 dart2jsCode: "GENERIC",
708 format: _formatAsyncAsIdentifier);
709
710 typedef FastaMessage _AsyncAsIdentifier(Uri uri, int charOffset);
711
712 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
713 FastaMessage _formatAsyncAsIdentifier(Uri uri, int charOffset) {
714 return new FastaMessage(uri, charOffset, codeAsyncAsIdentifier,
715 message:
716 "'async' can't be used as an identifier in 'async', 'async*', or 'sync *' methods.",
717 arguments: {});
718 }
719
720 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
721 const FastaCode<_YieldAsIdentifier> codeYieldAsIdentifier = const FastaCode<
722 _YieldAsIdentifier>(
723 template:
724 r"'yield' can't be used as an identifier in 'async', 'async*', or 'sync* ' methods.",
725 dart2jsCode: "FASTA_IGNORED",
726 format: _formatYieldAsIdentifier);
727
728 typedef FastaMessage _YieldAsIdentifier(Uri uri, int charOffset);
729
730 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
731 FastaMessage _formatYieldAsIdentifier(Uri uri, int charOffset) {
732 return new FastaMessage(uri, charOffset, codeYieldAsIdentifier,
733 message:
734 "'yield' can't be used as an identifier in 'async', 'async*', or 'sync *' methods.",
735 arguments: {});
736 }
737
738 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
739 const FastaCode<_OnlyTry> codeOnlyTry = const FastaCode<_OnlyTry>(
740 template:
741 r"Try block should be followed by 'on', 'catch', or 'finally' block.",
742 tip: r"Did you forget to add a 'finally' block?",
743 dart2jsCode: "FASTA_IGNORED",
744 format: _formatOnlyTry);
745
746 typedef FastaMessage _OnlyTry(Uri uri, int charOffset);
747
748 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
749 FastaMessage _formatOnlyTry(Uri uri, int charOffset) {
750 return new FastaMessage(uri, charOffset, codeOnlyTry,
751 message:
752 "Try block should be followed by 'on', 'catch', or 'finally' block.",
753 tip: "Did you forget to add a 'finally' block?",
754 arguments: {});
755 }
756
757 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
758 const FastaCode<
759 _InvalidInlineFunctionType> codeInvalidInlineFunctionType = const FastaCode<
760 _InvalidInlineFunctionType>(
761 template: r"Invalid inline function type.",
762 tip:
763 r"Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').",
764 dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE",
765 format: _formatInvalidInlineFunctionType);
766
767 typedef FastaMessage _InvalidInlineFunctionType(Uri uri, int charOffset);
768
769 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
770 FastaMessage _formatInvalidInlineFunctionType(Uri uri, int charOffset) {
771 return new FastaMessage(uri, charOffset, codeInvalidInlineFunctionType,
772 message: "Invalid inline function type.",
773 tip:
774 "Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').",
775 arguments: {});
776 }
777
778 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
779 const FastaCode<_ExpectedBody> codeExpectedBody =
780 const FastaCode<_ExpectedBody>(
781 template: r"Expected a function body or '=>'.",
782 tip: r"Try adding {}.",
783 dart2jsCode: "BODY_EXPECTED",
784 format: _formatExpectedBody);
785
786 typedef FastaMessage _ExpectedBody(Uri uri, int charOffset);
787
788 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
789 FastaMessage _formatExpectedBody(Uri uri, int charOffset) {
790 return new FastaMessage(uri, charOffset, codeExpectedBody,
791 message: "Expected a function body or '=>'.",
792 tip: "Try adding {}.",
793 arguments: {});
794 }
795
796 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
797 const FastaCode<_InvalidVoid> codeInvalidVoid = const FastaCode<_InvalidVoid>(
798 template: r"Type 'void' can't be used here because it isn't a return type.",
799 tip:
800 r"Try removing 'void' keyword or replace it with 'var', 'final', or a ty pe.",
801 dart2jsCode: "VOID_NOT_ALLOWED",
802 format: _formatInvalidVoid);
803
804 typedef FastaMessage _InvalidVoid(Uri uri, int charOffset);
805
806 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
807 FastaMessage _formatInvalidVoid(Uri uri, int charOffset) {
808 return new FastaMessage(uri, charOffset, codeInvalidVoid,
809 message: "Type 'void' can't be used here because it isn't a return type.",
810 tip:
811 "Try removing 'void' keyword or replace it with 'var', 'final', or a t ype.",
812 arguments: {});
813 }
814
815 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
816 const FastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType =
817 const FastaCode<_BuiltInIdentifierAsType>(
818 template: r"Can't use '#lexeme' as a type.",
819 dart2jsCode: "GENERIC",
820 format: _formatBuiltInIdentifierAsType);
821
822 typedef FastaMessage _BuiltInIdentifierAsType(
823 Uri uri, int charOffset, Token token);
824
825 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
826 FastaMessage _formatBuiltInIdentifierAsType(
827 Uri uri, int charOffset, Token token) {
828 String lexeme = token.lexeme;
829 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierAsType,
830 message: "Can't use '$lexeme' as a type.", arguments: {'token': token});
831 }
832
833 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
834 const FastaCode<_GeneratorReturnsValue> codeGeneratorReturnsValue =
835 const FastaCode<_GeneratorReturnsValue>(
836 template: r"'sync*' and 'async*' can't return a value.",
837 dart2jsCode: "FASTA_IGNORED",
838 format: _formatGeneratorReturnsValue);
839
840 typedef FastaMessage _GeneratorReturnsValue(Uri uri, int charOffset);
841
842 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
843 FastaMessage _formatGeneratorReturnsValue(Uri uri, int charOffset) {
844 return new FastaMessage(uri, charOffset, codeGeneratorReturnsValue,
845 message: "'sync*' and 'async*' can't return a value.", arguments: {});
846 }
847
848 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
849 const FastaCode<_BuiltInIdentifierInDeclaration>
850 codeBuiltInIdentifierInDeclaration =
851 const FastaCode<_BuiltInIdentifierInDeclaration>(
852 template: r"Can't use '#lexeme' as a name here.",
853 dart2jsCode: "GENERIC",
854 format: _formatBuiltInIdentifierInDeclaration);
855
856 typedef FastaMessage _BuiltInIdentifierInDeclaration(
857 Uri uri, int charOffset, Token token);
858
859 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
860 FastaMessage _formatBuiltInIdentifierInDeclaration(
861 Uri uri, int charOffset, Token token) {
862 String lexeme = token.lexeme;
863 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierInDeclaration,
864 message: "Can't use '$lexeme' as a name here.",
865 arguments: {'token': token});
866 }
867
868 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
869 const FastaCode<_NonAsciiIdentifier> codeNonAsciiIdentifier = const FastaCode<
870 _NonAsciiIdentifier>(
871 template:
872 r"The non-ASCII character '#character' (#unicode) can't be used in ident ifiers, only in strings and comments.",
873 tip:
874 r"Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).",
875 analyzerCode: "ILLEGAL_CHARACTER",
876 dart2jsCode: "BAD_INPUT_CHARACTER",
877 format: _formatNonAsciiIdentifier);
878
879 typedef FastaMessage _NonAsciiIdentifier(
880 Uri uri, int charOffset, String character, int codePoint);
881
882 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
883 FastaMessage _formatNonAsciiIdentifier(
884 Uri uri, int charOffset, String character, int codePoint) {
885 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
886 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier,
887 message:
888 "The non-ASCII character '$character' ($unicode) can't be used in iden tifiers, only in strings and comments.",
889 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).",
890 arguments: {'character': character, 'codePoint': codePoint});
891 }
892
893 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
894 const FastaCode<_ExtraneousModifierReplace> codeExtraneousModifierReplace =
895 const FastaCode<_ExtraneousModifierReplace>(
896 template: r"Can't have modifier '#lexeme' here.",
897 tip:
898 r"Try replacing modifier '#lexeme' with 'var', 'final', or a type.",
899 dart2jsCode: "EXTRANEOUS_MODIFIER_REPLACE",
900 format: _formatExtraneousModifierReplace);
901
902 typedef FastaMessage _ExtraneousModifierReplace(
903 Uri uri, int charOffset, Token token);
904
905 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
906 FastaMessage _formatExtraneousModifierReplace(
907 Uri uri, int charOffset, Token token) {
908 String lexeme = token.lexeme;
909 return new FastaMessage(uri, charOffset, codeExtraneousModifierReplace,
910 message: "Can't have modifier '$lexeme' here.",
911 tip: "Try replacing modifier '$lexeme' with 'var', 'final', or a type.",
912 arguments: {'token': token});
913 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698