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

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

Issue 10689036: First step towards having patch files for generic libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 6c9c41a652bbad603197f2a299f03e75e81de961..3437160e7305ae22686b41e0ad6bece8eb1ef394 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -1486,6 +1486,10 @@ class PartialFunctionElement extends FunctionElement {
FunctionExpression parseNode(DiagnosticListener listener) {
if (cachedNode != null) return cachedNode;
+ if (patch !== null) {
+ cachedNode = patch.parseNode(listener);
+ return cachedNode;
+ }
parseFunction(Parser p) {
if (isMember() && p.optional('factory', beginToken)) {
p.parseFactoryMethod(beginToken);
@@ -1497,7 +1501,10 @@ class PartialFunctionElement extends FunctionElement {
return cachedNode;
}
- Token position() => findMyName(beginToken);
+ Token position() {
+ if (patch !== null) return patch.position();
+ return findMyName(beginToken);
+ }
}
class PartialFieldListElement extends VariableListElement {

Powered by Google App Engine
This is Rietveld 408576698