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

Unified Diff: lib/compiler/implementation/warnings.dart

Issue 11014010: Made assert a keyword. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renamed Assert to assertHelper. Switched parser to use parseArguments. Added assert argument checki… Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/warnings.dart
diff --git a/lib/compiler/implementation/warnings.dart b/lib/compiler/implementation/warnings.dart
index 0e57d6838e2d82d2a56089a3d60da822bc73b07b..1974cbff50fa6049a49e9e57ddf7ebab756b59a4 100644
--- a/lib/compiler/implementation/warnings.dart
+++ b/lib/compiler/implementation/warnings.dart
@@ -303,6 +303,13 @@ Length: #{3}''');
static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind(
"Top-level variable cannot be declared static.");
+ static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind(
+ "Wrong number of arguments for assert. Should be 1, but given #{1}.");
ahe 2012/10/11 07:19:21 for -> to?
aam-me 2012/10/11 12:26:05 Thanks! Done.
+
+ static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind(
+ "assert takes no named arguments, but given #{1}.");
+
+
static const COMPILER_CRASHED = const MessageKind(
"Error: The compiler crashed when compiling this element.");

Powered by Google App Engine
This is Rietveld 408576698