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

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

Issue 10697096: Add "external" prefix to methods and constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 3437160e7305ae22686b41e0ad6bece8eb1ef394..bc1d74c821dbd86ec76d407733952cca394d1ecd 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -66,7 +66,7 @@ class Listener {
void beginFactoryMethod(Token token) {
}
- void endFactoryMethod(Token factoryKeyword, Token periodBeforeName,
+ void endFactoryMethod(Token startKeyword, Token periodBeforeName,
Token endToken) {
}
@@ -1403,7 +1403,7 @@ class NodeListener extends ElementListener {
pushNode(new EmptyStatement(token));
}
- void endFactoryMethod(Token factoryKeyword, Token periodBeforeName,
+ void endFactoryMethod(Token startKeyword, Token periodBeforeName,
Token endToken) {
Statement body = popNode();
NodeList formals = popNode();
@@ -1413,8 +1413,13 @@ class NodeListener extends ElementListener {
// A library prefix was handled in [handleQualified].
name = new Send(popNode(), name);
}
- handleModifier(factoryKeyword);
- handleModifiers(1);
ahe 2012/08/02 20:14:36 This is a hack.
+ handleModifier(startKeyword);
+ if (startKeyword.stringValue == 'external') {
ahe 2012/08/02 20:14:36 The hack no longer works.
+ handleModifier(startKeyword.next);
+ handleModifiers(2);
+ } else {
+ handleModifiers(1);
+ }
Modifiers modifiers = popNode();
pushNode(new FunctionExpression(name, formals, body, null,
modifiers, null, null));

Powered by Google App Engine
This is Rietveld 408576698