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

Side by Side Diff: pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart

Issue 1700243002: Share const-error messages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Use double-quotes Created 4 years, 10 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 DON'T EDIT. GENERATED. DON'T EDIT. 5 DON'T EDIT. GENERATED. DON'T EDIT.
6 This file has been generated by 'publish.dart' in the dart_messages package. 6 This file has been generated by 'publish.dart' in the dart_messages package.
7 7
8 Messages are maintained in `lib/shared_messages.dart` of that same package. 8 Messages are maintained in `lib/shared_messages.dart` of that same package.
9 After any change to that file, run `bin/publish.dart` to generate a new version 9 After any change to that file, run `bin/publish.dart` to generate a new version
10 of the json, dart2js and analyzer representations. 10 of the json, dart2js and analyzer representations.
11 */ 11 */
12 import '../messages.dart' show MessageKind, MessageTemplate; 12 import '../messages.dart' show MessageKind, MessageTemplate;
13 13
14 const Map<MessageKind, MessageTemplate> TEMPLATES = const <MessageKind, MessageT emplate>{ 14 const Map<MessageKind, MessageTemplate> TEMPLATES = const <MessageKind, MessageT emplate>{
15 MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY: const MessageTemplate( 15 MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY: const MessageTemplate(
16 MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY, 16 MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY,
17 "Const constructor or factory can't have a body.", 17 "Const constructor or factory can't have a body.",
18 howToFix: "Remove the 'const' keyword or the body.", 18 howToFix: "Remove the 'const' keyword or the body.",
19 examples: const [ 19 examples: const [
20 r''' 20 r"""
21 class C { 21 class C {
22 const C() {} 22 const C() {}
23 } 23 }
24 24
25 main() => new C();''', 25 main() => new C();""",
26 r''' 26 r"""
27 class C { 27 class C {
28 const factory C() {} 28 const factory C() {}
29 } 29 }
30 30
31 main() => new C();''', 31 main() => new C();""",
32 ]
33 ), // Generated. Don't edit.
34 MessageKind.EXTRANEOUS_MODIFIER: const MessageTemplate(
35 MessageKind.EXTRANEOUS_MODIFIER,
36 "Can't have modifier '#{modifier}' here.",
37 howToFix: "Try removing '#{modifier}'.",
38 examples: const [
39 "var String foo; main(){}",
40 "var set foo; main(){}",
41 "var final foo; main(){}",
42 "var var foo; main(){}",
43 "var const foo; main(){}",
44 "var abstract foo; main(){}",
45 "var static foo; main(){}",
46 "var external foo; main(){}",
47 "get var foo; main(){}",
48 "set var foo; main(){}",
49 "final var foo; main(){}",
50 "var var foo; main(){}",
51 "const var foo; main(){}",
52 "abstract var foo; main(){}",
53 "static var foo; main(){}",
54 "external var foo; main(){}",
55 ]
56 ), // Generated. Don't edit.
57 MessageKind.EXTRANEOUS_MODIFIER_REPLACE: const MessageTemplate(
58 MessageKind.EXTRANEOUS_MODIFIER_REPLACE,
59 "Can't have modifier '#{modifier}' here.",
60 howToFix: "Try replacing modifier '#{modifier}' with 'var', 'final', or a ty pe.",
61 examples: const [
62 "set foo; main(){}",
63 "abstract foo; main(){}",
64 "static foo; main(){}",
65 "external foo; main(){}",
32 ] 66 ]
33 ), // Generated. Don't edit. 67 ), // Generated. Don't edit.
34 }; 68 };
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698