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

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: wrap - verification error still pending 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: "*ignored*", 111 dart2jsCode: "*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: "*ignored*", 140 dart2jsCode: "*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 Template<Message Function(String string, String name)> 144 const Template<Message Function(String string, String name)>
125 templateUnexpected = 145 templateUnexpected =
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 523
504 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 524 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
505 Message _withArgumentsExpectedString(Token token) { 525 Message _withArgumentsExpectedString(Token token) {
506 String lexeme = token.lexeme; 526 String lexeme = token.lexeme;
507 return new Message(codeExpectedString, 527 return new Message(codeExpectedString,
508 message: """Expected a String, but got '$lexeme'.""", 528 message: """Expected a String, but got '$lexeme'.""",
509 arguments: {'token': token}); 529 arguments: {'token': token});
510 } 530 }
511 531
512 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 532 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
533 const Template<
534 Message Function(String string)> templateVerificationError = const Template<
535 Message Function(String string)>(
536 messageTemplate:
537 r"""An internal error was found while verifying the output of the compil er. #string""",
538 withArguments: _withArgumentsVerificationError);
539
540 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
541 const Code<Message Function(String string)> codeVerificationError =
542 const Code<Message Function(String string)>(
543 "VerificationError",
544 templateVerificationError,
545 );
546
547 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
548 Message _withArgumentsVerificationError(String string) {
549 return new Message(codeVerificationError,
550 message:
551 """An internal error was found while verifying the output of the compi ler. $string""",
552 arguments: {'string': string});
553 }
554
555 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
513 const Code<Null> codeFastaUsageShort = messageFastaUsageShort; 556 const Code<Null> codeFastaUsageShort = messageFastaUsageShort;
514 557
515 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 558 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
516 const MessageCode messageFastaUsageShort = 559 const MessageCode messageFastaUsageShort =
517 const MessageCode("FastaUsageShort", message: r"""Frequently used options: 560 const MessageCode("FastaUsageShort", message: r"""Frequently used options:
518 561
519 -o <file> Generate the output into <file>. 562 -o <file> Generate the output into <file>.
520 -h Display this message (add -v for information about all options).""") ; 563 -h Display this message (add -v for information about all options).""") ;
521 564
522 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 565 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 872
830 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 873 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
831 const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor", 874 const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor",
832 dart2jsCode: "INVALID_AWAIT_FOR", 875 dart2jsCode: "INVALID_AWAIT_FOR",
833 message: 876 message:
834 r"""'await' is only supported in methods with an 'async' or 'async*' bod y modifier.""", 877 r"""'await' is only supported in methods with an 'async' or 'async*' bod y modifier.""",
835 tip: 878 tip:
836 r"""Try adding 'async' or 'async*' to the method body or removing the 'a wait' keyword."""); 879 r"""Try adding 'async' or 'async*' to the method body or removing the 'a wait' keyword.""");
837 880
838 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 881 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
882 const Template<Message Function(String string)> templateMissingInputFile =
883 const Template<Message Function(String string)>(
884 messageTemplate: r"""Input file not found: #string.""",
885 withArguments: _withArgumentsMissingInputFile);
886
887 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
888 const Code<Message Function(String string)> codeMissingInputFile =
889 const Code<Message Function(String string)>(
890 "MissingInputFile",
891 templateMissingInputFile,
892 );
893
894 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
895 Message _withArgumentsMissingInputFile(String string) {
896 return new Message(codeMissingInputFile,
897 message: """Input file not found: $string.""",
898 arguments: {'string': string});
899 }
900
901 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
839 const Template<Message Function(Token token)> templateExpectedType = 902 const Template<Message Function(Token token)> templateExpectedType =
840 const Template<Message Function(Token token)>( 903 const Template<Message Function(Token token)>(
841 messageTemplate: r"""Expected a type, but got '#lexeme'.""", 904 messageTemplate: r"""Expected a type, but got '#lexeme'.""",
842 withArguments: _withArgumentsExpectedType); 905 withArguments: _withArgumentsExpectedType);
843 906
844 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 907 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
845 const Code<Message Function(Token token)> codeExpectedType = 908 const Code<Message Function(Token token)> codeExpectedType =
846 const Code<Message Function(Token token)>( 909 const Code<Message Function(Token token)>(
847 "ExpectedType", templateExpectedType, 910 "ExpectedType", templateExpectedType,
848 dart2jsCode: "*fatal*"); 911 dart2jsCode: "*fatal*");
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 1037
975 --fatal=errors 1038 --fatal=errors
976 --fatal=warnings 1039 --fatal=warnings
977 --fatal=nits 1040 --fatal=nits
978 Makes messages of the given kinds fatal, that is, immediately stop the 1041 Makes messages of the given kinds fatal, that is, immediately stop the
979 compiler with a non-zero exit-code. In --verbose mode, also display an 1042 compiler with a non-zero exit-code. In --verbose mode, also display an
980 internal stack trace from the compiler. Multiple kinds can be separated by 1043 internal stack trace from the compiler. Multiple kinds can be separated by
981 commas, for example, --fatal=errors,warnings."""); 1044 commas, for example, --fatal=errors,warnings.""");
982 1045
983 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1046 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1047 const Code<Null> codeMissingMain = messageMissingMain;
1048
1049 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1050 const MessageCode messageMissingMain = const MessageCode("MissingMain",
1051 dart2jsCode: "MISSING_MAIN",
1052 message: r"""No 'main' method found.""",
1053 tip: r"""Try adding a method named 'main' to your program.""");
1054
1055 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
984 const Code<Null> codeAwaitForNotAsync = messageAwaitForNotAsync; 1056 const Code<Null> codeAwaitForNotAsync = messageAwaitForNotAsync;
985 1057
986 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1058 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
987 const MessageCode messageAwaitForNotAsync = const MessageCode( 1059 const MessageCode messageAwaitForNotAsync = const MessageCode(
988 "AwaitForNotAsync", 1060 "AwaitForNotAsync",
989 dart2jsCode: "*ignored*", 1061 dart2jsCode: "*ignored*",
990 message: 1062 message:
991 r"""Asynchronous for-loop can only be used in 'async' or 'async*' method s."""); 1063 r"""Asynchronous for-loop can only be used in 'async' or 'async*' method s.""");
992 1064
993 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1065 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1141
1070 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1142 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1071 const Code<Null> codeTypeRequired = messageTypeRequired; 1143 const Code<Null> codeTypeRequired = messageTypeRequired;
1072 1144
1073 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1145 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1074 const MessageCode messageTypeRequired = const MessageCode("TypeRequired", 1146 const MessageCode messageTypeRequired = const MessageCode("TypeRequired",
1075 message: r"""A type or modifier is required here.""", 1147 message: r"""A type or modifier is required here.""",
1076 tip: r"""Try adding a type, 'var', 'const', or 'final'."""); 1148 tip: r"""Try adding a type, 'var', 'const', or 'final'.""");
1077 1149
1078 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1150 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1151 const Template<Message Function(String string)> templateMissingSdkRoot =
1152 const Template<Message Function(String string)>(
1153 messageTemplate: r"""SDK root directory not found: #string.""",
1154 withArguments: _withArgumentsMissingSdkRoot);
1155
1156 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1157 const Code<Message Function(String string)> codeMissingSdkRoot =
1158 const Code<Message Function(String string)>(
1159 "MissingSdkRoot",
1160 templateMissingSdkRoot,
1161 );
1162
1163 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1164 Message _withArgumentsMissingSdkRoot(String string) {
1165 return new Message(codeMissingSdkRoot,
1166 message: """SDK root directory not found: $string.""",
1167 arguments: {'string': string});
1168 }
1169
1170 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1079 const Code<Null> codeInvalidVoid = messageInvalidVoid; 1171 const Code<Null> codeInvalidVoid = messageInvalidVoid;
1080 1172
1081 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1173 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1082 const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid", 1174 const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid",
1083 dart2jsCode: "VOID_NOT_ALLOWED", 1175 dart2jsCode: "VOID_NOT_ALLOWED",
1084 message: 1176 message:
1085 r"""Type 'void' can't be used here because it isn't a return type.""", 1177 r"""Type 'void' can't be used here because it isn't a return type.""",
1086 tip: 1178 tip:
1087 r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type."""); 1179 r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type.""");
1088 1180
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 1320
1229 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1321 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1230 Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) { 1322 Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) {
1231 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; 1323 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
1232 return new Message(codeNonAsciiIdentifier, 1324 return new Message(codeNonAsciiIdentifier,
1233 message: 1325 message:
1234 """The non-ASCII character '$character' ($unicode) can't be used in id entifiers, only in strings and comments.""", 1326 """The non-ASCII character '$character' ($unicode) can't be used in id entifiers, only in strings and comments.""",
1235 tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$ ' (a dollar sign).""", 1327 tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$ ' (a dollar sign).""",
1236 arguments: {'character': character, 'codePoint': codePoint}); 1328 arguments: {'character': character, 'codePoint': codePoint});
1237 } 1329 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698