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

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

Issue 2979623002: Use messages for (some) public API errors (Closed)
Patch Set: Created 3 years, 5 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
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT. 5 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
6 // 6 //
7 // Instead modify 'pkg/front_end/messages.yaml' and run 7 // Instead modify 'pkg/front_end/messages.yaml' and run
8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update. 8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update.
9 9
10 part of fasta.codes; 10 part of fasta.codes;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const Code<Null> codeAwaitAsIdentifier = messageAwaitAsIdentifier; 106 const Code<Null> codeAwaitAsIdentifier = messageAwaitAsIdentifier;
107 107
108 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 108 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
109 const MessageCode messageAwaitAsIdentifier = const MessageCode( 109 const MessageCode messageAwaitAsIdentifier = const MessageCode(
110 "AwaitAsIdentifier", 110 "AwaitAsIdentifier",
111 dart2jsCode: "FASTA_IGNORED", 111 dart2jsCode: "FASTA_IGNORED",
112 message: 112 message:
113 r"""'await' can't be used as an identifier in 'async', 'async*', or 'syn c*' methods."""); 113 r"""'await' can't be used as an identifier in 'async', 'async*', or 'syn c*' methods.""");
114 114
115 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 115 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
116 const Template<Message Function(String string)> templateMissingSdkSummary =
117 const Template<Message Function(String string)>(
118 messageTemplate: r"""SDK summary not found: #string.""",
119 withArguments: _withArgumentsMissingSdkSummary);
120
121 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
122 const Code<Message Function(String string)> codeMissingSdkSummary =
123 const Code<Message Function(String string)>(
124 "MissingSdkSummary",
125 templateMissingSdkSummary,
126 );
127
128 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
129 Message _withArgumentsMissingSdkSummary(String string) {
130 return new Message(codeMissingSdkSummary,
131 message: """SDK summary not found: $string.""",
132 arguments: {'string': string});
133 }
134
135 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
116 const Code<Null> codeFactoryNotSync = messageFactoryNotSync; 136 const Code<Null> codeFactoryNotSync = messageFactoryNotSync;
117 137
118 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 138 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
119 const MessageCode messageFactoryNotSync = const MessageCode("FactoryNotSync", 139 const MessageCode messageFactoryNotSync = const MessageCode("FactoryNotSync",
120 dart2jsCode: "FASTA_IGNORED", 140 dart2jsCode: "FASTA_IGNORED",
121 message: r"""Factories can't use 'async', 'async*', or 'sync*'."""); 141 message: r"""Factories can't use 'async', 'async*', or 'sync*'.""");
122 142
123 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 143 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
124 const Code<Null> codeSuperNullAware = messageSuperNullAware; 144 const Code<Null> codeSuperNullAware = messageSuperNullAware;
125 145
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 messageEmptyOptionalParameterList; 336 messageEmptyOptionalParameterList;
317 337
318 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 338 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
319 const MessageCode messageEmptyOptionalParameterList = const MessageCode( 339 const MessageCode messageEmptyOptionalParameterList = const MessageCode(
320 "EmptyOptionalParameterList", 340 "EmptyOptionalParameterList",
321 dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST", 341 dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST",
322 message: r"""Optional parameter lists cannot be empty.""", 342 message: r"""Optional parameter lists cannot be empty.""",
323 tip: r"""Try adding an optional parameter to the list."""); 343 tip: r"""Try adding an optional parameter to the list.""");
324 344
325 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 345 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
346 const Code<Null> codeCombinedCompileSdkAndSummary =
347 messageCombinedCompileSdkAndSummary;
348
349 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
350 const MessageCode messageCombinedCompileSdkAndSummary = const MessageCode(
351 "CombinedCompileSdkAndSummary",
352 message:
353 r"""The compileSdk and sdkSummary options are mutually exclusive""");
354
355 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
326 const Template<Message Function(String name)> templateTypeNotFound = 356 const Template<Message Function(String name)> templateTypeNotFound =
327 const Template<Message Function(String name)>( 357 const Template<Message Function(String name)>(
328 messageTemplate: r"""Type '#name' not found.""", 358 messageTemplate: r"""Type '#name' not found.""",
329 withArguments: _withArgumentsTypeNotFound); 359 withArguments: _withArgumentsTypeNotFound);
330 360
331 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 361 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
332 const Code<Message Function(String name)> codeTypeNotFound = 362 const Code<Message Function(String name)> codeTypeNotFound =
333 const Code<Message Function(String name)>( 363 const Code<Message Function(String name)>(
334 "TypeNotFound", 364 "TypeNotFound",
335 templateTypeNotFound, 365 templateTypeNotFound,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 463
434 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 464 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
435 Message _withArgumentsExpectedString(Token token) { 465 Message _withArgumentsExpectedString(Token token) {
436 String lexeme = token.lexeme; 466 String lexeme = token.lexeme;
437 return new Message(codeExpectedString, 467 return new Message(codeExpectedString,
438 message: """Expected a String, but got '$lexeme'.""", 468 message: """Expected a String, but got '$lexeme'.""",
439 arguments: {'token': token}); 469 arguments: {'token': token});
440 } 470 }
441 471
442 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 472 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
473 const Template<
474 Message Function(String string)> templateVerificationError = const Template<
475 Message Function(String string)>(
476 messageTemplate:
477 r"""An internal error was found while verifying the output of the compil er. #string""",
478 withArguments: _withArgumentsVerificationError);
479
480 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
481 const Code<Message Function(String string)> codeVerificationError =
482 const Code<Message Function(String string)>(
483 "VerificationError",
484 templateVerificationError,
485 );
486
487 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
488 Message _withArgumentsVerificationError(String string) {
489 return new Message(codeVerificationError,
490 message:
491 """An internal error was found while verifying the output of the compi ler. $string""",
492 arguments: {'string': string});
493 }
494
495 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
443 const Code<Null> codeFastaUsageShort = messageFastaUsageShort; 496 const Code<Null> codeFastaUsageShort = messageFastaUsageShort;
444 497
445 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 498 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
446 const MessageCode messageFastaUsageShort = 499 const MessageCode messageFastaUsageShort =
447 const MessageCode("FastaUsageShort", message: r"""Frequently used options: 500 const MessageCode("FastaUsageShort", message: r"""Frequently used options:
448 501
449 -o <file> Generate the output into <file>. 502 -o <file> Generate the output into <file>.
450 -h Display this message (add -v for information about all options).""") ; 503 -h Display this message (add -v for information about all options).""") ;
451 504
452 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 505 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 812
760 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 813 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
761 const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor", 814 const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor",
762 dart2jsCode: "INVALID_AWAIT_FOR", 815 dart2jsCode: "INVALID_AWAIT_FOR",
763 message: 816 message:
764 r"""'await' is only supported in methods with an 'async' or 'async*' bod y modifier.""", 817 r"""'await' is only supported in methods with an 'async' or 'async*' bod y modifier.""",
765 tip: 818 tip:
766 r"""Try adding 'async' or 'async*' to the method body or removing the 'a wait' keyword."""); 819 r"""Try adding 'async' or 'async*' to the method body or removing the 'a wait' keyword.""");
767 820
768 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 821 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
822 const Template<Message Function(String string)> templateMissingInputFile =
823 const Template<Message Function(String string)>(
824 messageTemplate: r"""Input file not found: #string.""",
825 withArguments: _withArgumentsMissingInputFile);
826
827 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
828 const Code<Message Function(String string)> codeMissingInputFile =
829 const Code<Message Function(String string)>(
830 "MissingInputFile",
831 templateMissingInputFile,
832 );
833
834 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
835 Message _withArgumentsMissingInputFile(String string) {
836 return new Message(codeMissingInputFile,
837 message: """Input file not found: $string.""",
838 arguments: {'string': string});
839 }
840
841 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
769 const Template<Message Function(Token token)> templateExpectedType = 842 const Template<Message Function(Token token)> templateExpectedType =
770 const Template<Message Function(Token token)>( 843 const Template<Message Function(Token token)>(
771 messageTemplate: r"""Expected a type, but got '#lexeme'.""", 844 messageTemplate: r"""Expected a type, but got '#lexeme'.""",
772 withArguments: _withArgumentsExpectedType); 845 withArguments: _withArgumentsExpectedType);
773 846
774 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 847 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
775 const Code<Message Function(Token token)> codeExpectedType = 848 const Code<Message Function(Token token)> codeExpectedType =
776 const Code<Message Function(Token token)>( 849 const Code<Message Function(Token token)>(
777 "ExpectedType", templateExpectedType, 850 "ExpectedType", templateExpectedType,
778 dart2jsCode: "FASTA_FATAL"); 851 dart2jsCode: "FASTA_FATAL");
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 968
896 --fatal=errors 969 --fatal=errors
897 --fatal=warnings 970 --fatal=warnings
898 --fatal=nits 971 --fatal=nits
899 Makes messages of the given kinds fatal, that is, immediately stop the 972 Makes messages of the given kinds fatal, that is, immediately stop the
900 compiler with a non-zero exit-code. In --verbose mode, also display an 973 compiler with a non-zero exit-code. In --verbose mode, also display an
901 internal stack trace from the compiler. Multiple kinds can be separated by 974 internal stack trace from the compiler. Multiple kinds can be separated by
902 commas, for example, --fatal=errors,warnings."""); 975 commas, for example, --fatal=errors,warnings.""");
903 976
904 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 977 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
978 const Code<Null> codeMissingMain = messageMissingMain;
979
980 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
981 const MessageCode messageMissingMain = const MessageCode("MissingMain",
982 dart2jsCode: "MISSING_MAIN",
983 message: r"""No 'main' method found.""",
984 tip: r"""Try adding a method named 'main' to your program.""");
985
986 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
905 const Code<Null> codeAwaitForNotAsync = messageAwaitForNotAsync; 987 const Code<Null> codeAwaitForNotAsync = messageAwaitForNotAsync;
906 988
907 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 989 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
908 const MessageCode messageAwaitForNotAsync = const MessageCode( 990 const MessageCode messageAwaitForNotAsync = const MessageCode(
909 "AwaitForNotAsync", 991 "AwaitForNotAsync",
910 dart2jsCode: "FASTA_IGNORED", 992 dart2jsCode: "FASTA_IGNORED",
911 message: 993 message:
912 r"""Asynchronous for-loop can only be used in 'async' or 'async*' method s."""); 994 r"""Asynchronous for-loop can only be used in 'async' or 'async*' method s.""");
913 995
914 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 996 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 1073
992 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1074 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
993 const Code<Null> codeTypeRequired = messageTypeRequired; 1075 const Code<Null> codeTypeRequired = messageTypeRequired;
994 1076
995 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1077 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
996 const MessageCode messageTypeRequired = const MessageCode("TypeRequired", 1078 const MessageCode messageTypeRequired = const MessageCode("TypeRequired",
997 message: r"""A type or modifier is required here.""", 1079 message: r"""A type or modifier is required here.""",
998 tip: r"""Try adding a type, 'var', 'const', or 'final'."""); 1080 tip: r"""Try adding a type, 'var', 'const', or 'final'.""");
999 1081
1000 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1082 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1083 const Template<Message Function(String string)> templateMissingSdkRoot =
1084 const Template<Message Function(String string)>(
1085 messageTemplate: r"""SDK root directory not found: #string.""",
1086 withArguments: _withArgumentsMissingSdkRoot);
1087
1088 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1089 const Code<Message Function(String string)> codeMissingSdkRoot =
1090 const Code<Message Function(String string)>(
1091 "MissingSdkRoot",
1092 templateMissingSdkRoot,
1093 );
1094
1095 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1096 Message _withArgumentsMissingSdkRoot(String string) {
1097 return new Message(codeMissingSdkRoot,
1098 message: """SDK root directory not found: $string.""",
1099 arguments: {'string': string});
1100 }
1101
1102 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1001 const Code<Null> codeInvalidVoid = messageInvalidVoid; 1103 const Code<Null> codeInvalidVoid = messageInvalidVoid;
1002 1104
1003 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1105 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1004 const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid", 1106 const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid",
1005 dart2jsCode: "VOID_NOT_ALLOWED", 1107 dart2jsCode: "VOID_NOT_ALLOWED",
1006 message: 1108 message:
1007 r"""Type 'void' can't be used here because it isn't a return type.""", 1109 r"""Type 'void' can't be used here because it isn't a return type.""",
1008 tip: 1110 tip:
1009 r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type."""); 1111 r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type.""");
1010 1112
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1232
1131 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1233 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1132 Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) { 1234 Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) {
1133 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; 1235 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
1134 return new Message(codeNonAsciiIdentifier, 1236 return new Message(codeNonAsciiIdentifier,
1135 message: 1237 message:
1136 """The non-ASCII character '$character' ($unicode) can't be used in id entifiers, only in strings and comments.""", 1238 """The non-ASCII character '$character' ($unicode) can't be used in id entifiers, only in strings and comments.""",
1137 tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$ ' (a dollar sign).""", 1239 tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$ ' (a dollar sign).""",
1138 arguments: {'character': character, 'codePoint': codePoint}); 1240 arguments: {'character': character, 'codePoint': codePoint});
1139 } 1241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698