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

Unified Diff: lib/compiler/implementation/scanner/listener.dart

Issue 11014010: Made assert a keyword. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed grammar. 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
« no previous file with comments | « lib/compiler/implementation/scanner/keyword.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 86d088ccf046b8528bc26ee08fb12eecf63370b6..424d17f85b17f9c4ae2cb5fa442f061d4c526f74 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -436,6 +436,9 @@ class Listener {
void handleEmptyStatement(Token token) {
}
+ void handleAssertStatement(Token assertKeyword, Token semicolonToken) {
+ }
+
/** Called with either the token containing a double literal, or
* an immediately preceding "unary plus" token.
*/
@@ -1697,6 +1700,13 @@ class NodeListener extends ElementListener {
beginToken, inKeyword));
}
+ void handleAssertStatement(Token assertKeyword, Token semicolonToken) {
+ NodeList arguments = popNode();
+ Node selector = new Identifier(assertKeyword);
+ Node send = new Send(null, selector, arguments);
+ pushNode(new ExpressionStatement(send, semicolonToken));
+ }
+
void endUnamedFunction(Token token) {
Statement body = popNode();
NodeList formals = popNode();
« no previous file with comments | « lib/compiler/implementation/scanner/keyword.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698