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

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

Issue 10905305: Patch refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased. 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/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 3dd58147924e7f7584f09ffb5f5e8797cf338226..83993715add42fc862dd9989e195d8e8ccf44f8c 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -981,7 +981,7 @@ class ElementListener extends Listener {
if (!allowLibraryTags()) {
recoverableError('library tags not allowed here', node: tag);
}
- compilationUnitElement.getLibrary().addTag(tag, listener);
+ compilationUnitElement.getImplementationLibrary().addTag(tag, listener);
}
void pushNode(Node node) {
@@ -1702,13 +1702,11 @@ class PartialFunctionElement extends FunctionElement {
FunctionExpression parseNode(DiagnosticListener listener) {
if (cachedNode != null) return cachedNode;
- if (patch !== null) {
- cachedNode = patch.parseNode(listener);
- return cachedNode;
- }
- if (modifiers.isExternal()) {
- listener.cancel("External method without an implementation",
- element: this);
+ if (patch === null) {
+ if (modifiers.isExternal()) {
+ listener.cancel("External method without an implementation",
+ element: this);
+ }
}
parseFunction(Parser p) {
if (isMember() && modifiers.isFactory()) {
@@ -1722,7 +1720,6 @@ class PartialFunctionElement extends FunctionElement {
}
Token position() {
- if (patch !== null) return patch.position();
return findMyName(beginToken);
}

Powered by Google App Engine
This is Rietveld 408576698