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

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

Issue 10696147: Patch methods in classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small type/typo fixes 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 bc1d74c821dbd86ec76d407733952cca394d1ecd..b116b7ea5555c770e19f5af705c868b9ce59aa6b 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -1414,7 +1414,7 @@ class NodeListener extends ElementListener {
name = new Send(popNode(), name);
}
handleModifier(startKeyword);
- if (startKeyword.stringValue == 'external') {
+ if (startKeyword.stringValue === 'external') {
handleModifier(startKeyword.next);
handleModifiers(2);
} else {
@@ -1495,8 +1495,12 @@ class PartialFunctionElement extends FunctionElement {
cachedNode = patch.parseNode(listener);
return cachedNode;
}
+ if (modifiers.isExternal()) {
+ listener.cancel("External method without an implementation",
+ element: this);
+ }
parseFunction(Parser p) {
- if (isMember() && p.optional('factory', beginToken)) {
+ if (isMember() && modifiers.isFactory()) {
p.parseFactoryMethod(beginToken);
} else {
p.parseFunction(beginToken, getOrSet);
« no previous file with comments | « lib/compiler/implementation/scanner/class_element_parser.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698