Chromium Code Reviews| 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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1759 """ | 1759 """ |
| 1760 main() => \"\"\" | 1760 main() => \"\"\" |
| 1761 """, | 1761 """, |
| 1762 """ | 1762 """ |
| 1763 main() => r''' | 1763 main() => r''' |
| 1764 """, | 1764 """, |
| 1765 """ | 1765 """ |
| 1766 main() => r\"\"\" | 1766 main() => r\"\"\" |
| 1767 """]); | 1767 """]); |
| 1768 | 1768 |
| 1769 static const MessageKind UNMATCHED_TOKEN = const MessageKind( | |
| 1770 "Can't find '#{end}' to match '#{begin}'.", | |
| 1771 howToFix: DONT_KNOW_HOW_TO_FIX, | |
| 1772 examples: const[ | |
| 1773 "main(", | |
| 1774 "main(){", | |
| 1775 "main(){]}", | |
|
ahe
2014/04/24 13:08:33
These three examples are tests. They are exercised
| |
| 1776 ]); | |
| 1777 | |
| 1769 static const MessageKind UNTERMINATED_TOKEN = const MessageKind( | 1778 static const MessageKind UNTERMINATED_TOKEN = const MessageKind( |
| 1770 // This is a fall-back message that shouldn't happen. | 1779 // This is a fall-back message that shouldn't happen. |
| 1771 "Incomplete token."); | 1780 "Incomplete token."); |
| 1772 | 1781 |
| 1773 static const MessageKind EXPONENT_MISSING = const MessageKind( | 1782 static const MessageKind EXPONENT_MISSING = const MessageKind( |
| 1774 "Numbers in exponential notation should always contain an exponent" | 1783 "Numbers in exponential notation should always contain an exponent" |
| 1775 " (an integer number with an optional sign).", | 1784 " (an integer number with an optional sign).", |
| 1776 howToFix: "Make sure there is an exponent, and remove any whitespace " | 1785 howToFix: "Make sure there is an exponent, and remove any whitespace " |
| 1777 "before it.", | 1786 "before it.", |
| 1778 examples: const [""" | 1787 examples: const [""" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2031 return computeMessage(); | 2040 return computeMessage(); |
| 2032 } | 2041 } |
| 2033 | 2042 |
| 2034 bool operator==(other) { | 2043 bool operator==(other) { |
| 2035 if (other is !Message) return false; | 2044 if (other is !Message) return false; |
| 2036 return (kind == other.kind) && (toString() == other.toString()); | 2045 return (kind == other.kind) && (toString() == other.toString()); |
| 2037 } | 2046 } |
| 2038 | 2047 |
| 2039 int get hashCode => throw new UnsupportedError('Message.hashCode'); | 2048 int get hashCode => throw new UnsupportedError('Message.hashCode'); |
| 2040 } | 2049 } |
| OLD | NEW |