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 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1976 | 1976 |
1977 static const MessageKind HIDDEN_HINTS = const MessageKind( | 1977 static const MessageKind HIDDEN_HINTS = const MessageKind( |
1978 "#{hints} hint(s) suppressed in #{uri}."); | 1978 "#{hints} hint(s) suppressed in #{uri}."); |
1979 | 1979 |
1980 static const MessageKind PREAMBLE = const MessageKind( | 1980 static const MessageKind PREAMBLE = const MessageKind( |
1981 "When run on the command-line, the compiled output might" | 1981 "When run on the command-line, the compiled output might" |
1982 " require a preamble file located in:\n" | 1982 " require a preamble file located in:\n" |
1983 " <sdk>/lib/_internal/compiler/js_lib/preambles."); | 1983 " <sdk>/lib/_internal/compiler/js_lib/preambles."); |
1984 | 1984 |
1985 | 1985 |
| 1986 static const MessageKind EXPERIMENTAL_ENUMS = const MessageKind( |
| 1987 "Experimental language feature 'enums' is not supported.", |
| 1988 howToFix: "Use option '--enable-enum' to use enum declarations.", |
| 1989 examples: const [""" |
| 1990 enum Enum { A, B, C } |
| 1991 main() => print(Enum.A); |
| 1992 """]); |
| 1993 |
1986 static const MessageKind EXPERIMENTAL_ASYNC_AWAIT = const MessageKind( | 1994 static const MessageKind EXPERIMENTAL_ASYNC_AWAIT = const MessageKind( |
1987 "Experimental language feature 'async/await' is not supported."); | 1995 "Experimental language feature 'async/await' is not supported."); |
1988 | 1996 |
1989 static const MessageKind INVALID_STARRED_KEYWORD = const MessageKind( | 1997 static const MessageKind INVALID_STARRED_KEYWORD = const MessageKind( |
1990 "Invalid '#{keyword}' keyword.", | 1998 "Invalid '#{keyword}' keyword.", |
1991 options: const ['--enable-async'], | 1999 options: const ['--enable-async'], |
1992 howToFix: "Try removing whitespace between '#{keyword}' and '*'.", | 2000 howToFix: "Try removing whitespace between '#{keyword}' and '*'.", |
1993 examples: const [ | 2001 examples: const [ |
1994 "main() async * {}", | 2002 "main() async * {}", |
1995 "main() sync * {}", | 2003 "main() sync * {}", |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 static String convertToString(value) { | 2242 static String convertToString(value) { |
2235 if (value is ErrorToken) { | 2243 if (value is ErrorToken) { |
2236 // Shouldn't happen. | 2244 // Shouldn't happen. |
2237 return value.assertionMessage; | 2245 return value.assertionMessage; |
2238 } else if (value is Token) { | 2246 } else if (value is Token) { |
2239 value = value.value; | 2247 value = value.value; |
2240 } | 2248 } |
2241 return '$value'; | 2249 return '$value'; |
2242 } | 2250 } |
2243 } | 2251 } |
OLD | NEW |