| OLD | NEW |
| 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 /// The messages in this file should follow the [Guide for Writing | 5 /// The messages in this file should follow the [Guide for Writing |
| 6 /// Diagnostics](../../../../front_end/lib/src/fasta/diagnostics.md). | 6 /// Diagnostics](../../../../front_end/lib/src/fasta/diagnostics.md). |
| 7 /// | 7 /// |
| 8 /// Other things to keep in mind: | 8 /// Other things to keep in mind: |
| 9 /// | 9 /// |
| 10 /// An INFO message should always be preceded by a non-INFO message, and the | 10 /// An INFO message should always be preceded by a non-INFO message, and the |
| (...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 MessageKind.DUPLICATED_RESOURCE, | 2095 MessageKind.DUPLICATED_RESOURCE, |
| 2096 "The resource '#{resourceUri}' is loaded through both " | 2096 "The resource '#{resourceUri}' is loaded through both " |
| 2097 "'#{canonicalUri1}' and '#{canonicalUri2}'."), | 2097 "'#{canonicalUri1}' and '#{canonicalUri2}'."), |
| 2098 | 2098 |
| 2099 MessageKind.DUPLICATED_LIBRARY_RESOURCE: const MessageTemplate( | 2099 MessageKind.DUPLICATED_LIBRARY_RESOURCE: const MessageTemplate( |
| 2100 MessageKind.DUPLICATED_LIBRARY_RESOURCE, | 2100 MessageKind.DUPLICATED_LIBRARY_RESOURCE, |
| 2101 "The library '#{libraryName}' in '#{resourceUri}' is loaded through " | 2101 "The library '#{libraryName}' in '#{resourceUri}' is loaded through " |
| 2102 "both '#{canonicalUri1}' and '#{canonicalUri2}'."), | 2102 "both '#{canonicalUri1}' and '#{canonicalUri2}'."), |
| 2103 | 2103 |
| 2104 // This is used as an exception. | 2104 // This is used as an exception. |
| 2105 MessageKind.INVALID_SOURCE_FILE_LOCATION: const MessageTemplate( | 2105 MessageKind.INVALID_SOURCE_FILE_LOCATION: |
| 2106 MessageKind.INVALID_SOURCE_FILE_LOCATION, | 2106 const MessageTemplate(MessageKind.INVALID_SOURCE_FILE_LOCATION, ''' |
| 2107 ''' | |
| 2108 Invalid offset (#{offset}) in source map. | 2107 Invalid offset (#{offset}) in source map. |
| 2109 File: #{fileName} | 2108 File: #{fileName} |
| 2110 Length: #{length}'''), | 2109 Length: #{length}'''), |
| 2111 | 2110 |
| 2112 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC: const MessageTemplate( | 2111 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC: const MessageTemplate( |
| 2113 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC, | 2112 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC, |
| 2114 "Top-level variable cannot be declared static."), | 2113 "Top-level variable cannot be declared static."), |
| 2115 | 2114 |
| 2116 MessageKind.REFERENCE_IN_INITIALIZATION: const MessageTemplate( | 2115 MessageKind.REFERENCE_IN_INITIALIZATION: const MessageTemplate( |
| 2117 MessageKind.REFERENCE_IN_INITIALIZATION, | 2116 MessageKind.REFERENCE_IN_INITIALIZATION, |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3200 MessageKind.MAIN_WITH_EXTRA_PARAMETER, | 3199 MessageKind.MAIN_WITH_EXTRA_PARAMETER, |
| 3201 "'#{main}' cannot have more than two parameters.", | 3200 "'#{main}' cannot have more than two parameters.", |
| 3202 howToFix: DONT_KNOW_HOW_TO_FIX, | 3201 howToFix: DONT_KNOW_HOW_TO_FIX, |
| 3203 /* Don't state the obvious. */ | 3202 /* Don't state the obvious. */ |
| 3204 examples: const ['main(a, b, c) {}']), | 3203 examples: const ['main(a, b, c) {}']), |
| 3205 | 3204 |
| 3206 MessageKind.COMPILER_CRASHED: const MessageTemplate( | 3205 MessageKind.COMPILER_CRASHED: const MessageTemplate( |
| 3207 MessageKind.COMPILER_CRASHED, | 3206 MessageKind.COMPILER_CRASHED, |
| 3208 "The compiler crashed when compiling this element."), | 3207 "The compiler crashed when compiling this element."), |
| 3209 | 3208 |
| 3210 MessageKind.PLEASE_REPORT_THE_CRASH: const MessageTemplate( | 3209 MessageKind.PLEASE_REPORT_THE_CRASH: |
| 3211 MessageKind.PLEASE_REPORT_THE_CRASH, | 3210 const MessageTemplate(MessageKind.PLEASE_REPORT_THE_CRASH, ''' |
| 3212 ''' | |
| 3213 The compiler is broken. | 3211 The compiler is broken. |
| 3214 | 3212 |
| 3215 When compiling the above element, the compiler crashed. It is not | 3213 When compiling the above element, the compiler crashed. It is not |
| 3216 possible to tell if this is caused by a problem in your program or | 3214 possible to tell if this is caused by a problem in your program or |
| 3217 not. Regardless, the compiler should not crash. | 3215 not. Regardless, the compiler should not crash. |
| 3218 | 3216 |
| 3219 The Dart team would greatly appreciate if you would take a moment to | 3217 The Dart team would greatly appreciate if you would take a moment to |
| 3220 report this problem at http://dartbug.com/new. | 3218 report this problem at http://dartbug.com/new. |
| 3221 | 3219 |
| 3222 Please include the following information: | 3220 Please include the following information: |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3800 static String convertToString(value) { | 3798 static String convertToString(value) { |
| 3801 if (value is ErrorToken) { | 3799 if (value is ErrorToken) { |
| 3802 // Shouldn't happen. | 3800 // Shouldn't happen. |
| 3803 return value.assertionMessage; | 3801 return value.assertionMessage; |
| 3804 } else if (value is Token) { | 3802 } else if (value is Token) { |
| 3805 value = value.lexeme; | 3803 value = value.lexeme; |
| 3806 } | 3804 } |
| 3807 return '$value'; | 3805 return '$value'; |
| 3808 } | 3806 } |
| 3809 } | 3807 } |
| OLD | NEW |