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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 const DONT_KNOW_HOW_TO_FIX = ""; | 7 const DONT_KNOW_HOW_TO_FIX = ""; |
8 | 8 |
9 /** | 9 /** |
10 * The messages in this file should meet the following guide lines: | 10 * The messages in this file should meet the following guide lines: |
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2053 "'#{constructorName}'."); | 2053 "'#{constructorName}'."); |
2054 | 2054 |
2055 static const MessageKind PATCH_NON_FUNCTION = const MessageKind( | 2055 static const MessageKind PATCH_NON_FUNCTION = const MessageKind( |
2056 "Cannot patch non-function with function patch " | 2056 "Cannot patch non-function with function patch " |
2057 "'#{functionName}'."); | 2057 "'#{functionName}'."); |
2058 | 2058 |
2059 ////////////////////////////////////////////////////////////////////////////// | 2059 ////////////////////////////////////////////////////////////////////////////// |
2060 // Patch errors end. | 2060 // Patch errors end. |
2061 ////////////////////////////////////////////////////////////////////////////// | 2061 ////////////////////////////////////////////////////////////////////////////// |
2062 | 2062 |
| 2063 static const String IMPORT_EXPERIMENTAL_MIRRORS_PADDING = '\n* '; |
| 2064 |
| 2065 static const MessageKind IMPORT_EXPERIMENTAL_MIRRORS = |
| 2066 const MessageKind(r''' |
| 2067 |
| 2068 **************************************************************** |
| 2069 * WARNING: dart:mirrors support in dart2js is experimental, |
| 2070 * and not recommended. |
| 2071 * This implementation of mirrors is incomplete, |
| 2072 * and often greatly increases the size of the generated |
| 2073 * JavaScript code. |
| 2074 * |
| 2075 * Your app imports dart:mirrors via:'''''' |
| 2076 $IMPORT_EXPERIMENTAL_MIRRORS_PADDING#{importChain} |
| 2077 * |
| 2078 * Starting with Dart 1.8, you must use the |
| 2079 * --enable-experimental-mirrors command-line flag to opt-in. |
| 2080 * You can begin using this flag now if mirrors support is critical. |
| 2081 * |
| 2082 * To learn what to do next, please visit: |
| 2083 * http://dartlang.org/articles/reflection-and-code-gen |
| 2084 **************************************************************** |
| 2085 '''); |
| 2086 |
2063 static const MessageKind CALL_NOT_SUPPORTED_ON_NATIVE_CLASS = | 2087 static const MessageKind CALL_NOT_SUPPORTED_ON_NATIVE_CLASS = |
2064 const MessageKind( | 2088 const MessageKind( |
2065 "Non-supported 'call' member on a native class, or a " | 2089 "Non-supported 'call' member on a native class, or a " |
2066 "subclass of a native class."); | 2090 "subclass of a native class."); |
2067 | 2091 |
2068 toString() => template; | 2092 toString() => template; |
2069 | 2093 |
2070 Message message([Map arguments = const {}, bool terse = false]) { | 2094 Message message([Map arguments = const {}, bool terse = false]) { |
2071 return new Message(this, arguments, terse); | 2095 return new Message(this, arguments, terse); |
2072 } | 2096 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 static String convertToString(value) { | 2144 static String convertToString(value) { |
2121 if (value is ErrorToken) { | 2145 if (value is ErrorToken) { |
2122 // Shouldn't happen. | 2146 // Shouldn't happen. |
2123 return value.assertionMessage; | 2147 return value.assertionMessage; |
2124 } else if (value is Token) { | 2148 } else if (value is Token) { |
2125 value = value.value; | 2149 value = value.value; |
2126 } | 2150 } |
2127 return '$value'; | 2151 return '$value'; |
2128 } | 2152 } |
2129 } | 2153 } |
OLD | NEW |