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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 251523002: Improve error-recovery from unmatched braces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r35370 Created 6 years, 8 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 | Annotate | Revision Log
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 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
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(){]}",
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
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 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/scanner/token.dart ('k') | dart/tests/compiler/dart2js/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698