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

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

Issue 1346133002: Report hint on unmatched show and hide combinators. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove line-ending changes. Created 5 years, 3 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 5
6 /** 6 /**
7 * The messages in this file should meet the following guide lines: 7 * The messages in this file should meet the following guide lines:
8 * 8 *
9 * 1. The message should be a complete sentence starting with an uppercase 9 * 1. The message should be a complete sentence starting with an uppercase
10 * letter, and ending with a period. 10 * letter, and ending with a period.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 DUPLICATE_INITIALIZER, 177 DUPLICATE_INITIALIZER,
178 DUPLICATE_LABEL, 178 DUPLICATE_LABEL,
179 DUPLICATE_SUPER_INITIALIZER, 179 DUPLICATE_SUPER_INITIALIZER,
180 DUPLICATE_TYPE_VARIABLE_NAME, 180 DUPLICATE_TYPE_VARIABLE_NAME,
181 DUPLICATED_LIBRARY_NAME, 181 DUPLICATED_LIBRARY_NAME,
182 DUPLICATED_LIBRARY_RESOURCE, 182 DUPLICATED_LIBRARY_RESOURCE,
183 DUPLICATED_PART_OF, 183 DUPLICATED_PART_OF,
184 DUPLICATED_RESOURCE, 184 DUPLICATED_RESOURCE,
185 EMPTY_CATCH_DECLARATION, 185 EMPTY_CATCH_DECLARATION,
186 EMPTY_ENUM_DECLARATION, 186 EMPTY_ENUM_DECLARATION,
187 EMPTY_HIDE,
187 EQUAL_MAP_ENTRY_KEY, 188 EQUAL_MAP_ENTRY_KEY,
189 EMPTY_SHOW,
188 EXISTING_DEFINITION, 190 EXISTING_DEFINITION,
189 EXISTING_LABEL, 191 EXISTING_LABEL,
190 EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, 192 EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
191 EXPONENT_MISSING, 193 EXPONENT_MISSING,
192 EXPORT_BEFORE_PARTS, 194 EXPORT_BEFORE_PARTS,
193 EXTERNAL_WITH_BODY, 195 EXTERNAL_WITH_BODY,
194 EXTRA_CATCH_DECLARATION, 196 EXTRA_CATCH_DECLARATION,
195 EXTRA_FORMALS, 197 EXTRA_FORMALS,
196 EXTRANEOUS_MODIFIER, 198 EXTRANEOUS_MODIFIER,
197 EXTRANEOUS_MODIFIER_REPLACE, 199 EXTRANEOUS_MODIFIER_REPLACE,
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 import 'conflictsWithDartAsWell.dart'; 817 import 'conflictsWithDartAsWell.dart';
816 818
817 main() { 819 main() {
818 print("Hail Caesar ${Duration.x}"); 820 print("Hail Caesar ${Duration.x}");
819 } 821 }
820 """}]), 822 """}]),
821 823
822 MessageKind.DUPLICATE_EXPORT: 824 MessageKind.DUPLICATE_EXPORT:
823 const MessageTemplate(MessageKind.DUPLICATE_EXPORT, 825 const MessageTemplate(MessageKind.DUPLICATE_EXPORT,
824 "Duplicate export of '#{name}'.", 826 "Duplicate export of '#{name}'.",
825 howToFix: "Trying adding 'hide #{name}' to one of the exports.", 827 howToFix: "Try adding 'hide #{name}' to one of the exports.",
826 examples: const [const { 828 examples: const [const {
827 'main.dart': """ 829 'main.dart': """
828 export 'decl1.dart'; 830 export 'decl1.dart';
829 export 'decl2.dart'; 831 export 'decl2.dart';
830 832
831 main() {}""", 833 main() {}""",
832 'decl1.dart': "class Class {}", 834 'decl1.dart': "class Class {}",
833 'decl2.dart': "class Class {}"}]), 835 'decl2.dart': "class Class {}"}]),
834 836
835 MessageKind.DUPLICATE_EXPORT_CONT: 837 MessageKind.DUPLICATE_EXPORT_CONT:
836 const MessageTemplate(MessageKind.DUPLICATE_EXPORT_CONT, 838 const MessageTemplate(MessageKind.DUPLICATE_EXPORT_CONT,
837 "This is another export of '#{name}'."), 839 "This is another export of '#{name}'."),
838 840
839 MessageKind.DUPLICATE_EXPORT_DECL: 841 MessageKind.DUPLICATE_EXPORT_DECL:
840 const MessageTemplate(MessageKind.DUPLICATE_EXPORT_DECL, 842 const MessageTemplate(MessageKind.DUPLICATE_EXPORT_DECL,
841 "The exported '#{name}' from export #{uriString} is defined here."), 843 "The exported '#{name}' from export #{uriString} is defined here."),
842 844
845 MessageKind.EMPTY_HIDE:
846 const MessageTemplate(MessageKind.EMPTY_HIDE,
847 "Library '#{uri}' doesn't export a '#{name}' declaration.",
848 howToFix: "Try removing '#{name}' the 'hide' clause.",
849 examples: const [
850 const {
851 'main.dart': """
852 import 'dart:core' hide Foo;
853
854 main() {}"""},
855 const {
856 'main.dart': """
857 export 'dart:core' hide Foo;
858
859 main() {}"""},
860 ]),
861
862 MessageKind.EMPTY_SHOW:
863 const MessageTemplate(MessageKind.EMPTY_SHOW,
864 "Library '#{uri}' doesn't export a '#{name}' declaration.",
865 howToFix: "Try removing '#{name}' from the 'show' clause.",
866 examples: const [
867 const {
868 'main.dart': """
869 import 'dart:core' show Foo;
870
871 main() {}"""},
872 const {
873 'main.dart': """
874 export 'dart:core' show Foo;
875
876 main() {}"""},
877 ]),
878
843 MessageKind.NOT_A_TYPE: 879 MessageKind.NOT_A_TYPE:
844 const MessageTemplate(MessageKind.NOT_A_TYPE, 880 const MessageTemplate(MessageKind.NOT_A_TYPE,
845 "'#{node}' is not a type."), 881 "'#{node}' is not a type."),
846 882
847 MessageKind.NOT_A_PREFIX: 883 MessageKind.NOT_A_PREFIX:
848 const MessageTemplate(MessageKind.NOT_A_PREFIX, 884 const MessageTemplate(MessageKind.NOT_A_PREFIX,
849 "'#{node}' is not a prefix."), 885 "'#{node}' is not a prefix."),
850 886
851 MessageKind.PREFIX_AS_EXPRESSION: 887 MessageKind.PREFIX_AS_EXPRESSION:
852 const MessageTemplate(MessageKind.PREFIX_AS_EXPRESSION, 888 const MessageTemplate(MessageKind.PREFIX_AS_EXPRESSION,
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 static String convertToString(value) { 3439 static String convertToString(value) {
3404 if (value is ErrorToken) { 3440 if (value is ErrorToken) {
3405 // Shouldn't happen. 3441 // Shouldn't happen.
3406 return value.assertionMessage; 3442 return value.assertionMessage;
3407 } else if (value is Token) { 3443 } else if (value is Token) {
3408 value = value.value; 3444 value = value.value;
3409 } 3445 }
3410 return '$value'; 3446 return '$value';
3411 } 3447 }
3412 } 3448 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698