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

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

Issue 10831262: Revert "Revert "Allow patch files to add top-level declarations to the patched library."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bugs Created 8 years, 4 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 576512f901c74a2f890dff423f9236a1fbbc345a..9ffe69c5350655b9eda0725c427dfeb58f0e60e2 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -1522,6 +1522,16 @@ class PartialFunctionElement extends FunctionElement {
if (patch !== null) return patch.position();
return findMyName(beginToken);
}
+
+ PartialFunctionElement cloneTo(Element enclosing,
+ DiagnosticListener listener) {
+ if (patch !== null) {
+ listener.cancel("Cloning a patched function.", element: this);
+ }
+ PartialFunctionElement result = new PartialFunctionElement(
+ name, beginToken, getOrSet, endToken, kind, modifiers, enclosing);
+ return result;
+ }
}
class PartialFieldListElement extends VariableListElement {
@@ -1551,6 +1561,13 @@ class PartialFieldListElement extends VariableListElement {
}
Token position() => beginToken; // findMyName doesn't work. I'm nameless.
+
+ PartialFieldListElement cloneTo(Element enclosing,
+ DiagnosticListener listener) {
+ PartialFieldListElement result = new PartialFieldListElement(
+ beginToken, endToken, modifiers, enclosing);
+ return result;
+ }
}
class PartialTypedefElement extends TypedefElement {
@@ -1568,6 +1585,13 @@ class PartialTypedefElement extends TypedefElement {
}
position() => findMyName(token);
+
+ PartialTypedefElement cloneTo(Element enclosing,
+ DiagnosticListener listener) {
+ PartialTypedefElement result =
+ new PartialTypedefElement(name, enclosing, token);
+ return result;
+ }
}
Node parse(DiagnosticListener diagnosticListener,
« no previous file with comments | « lib/compiler/implementation/scanner/class_element_parser.dart ('k') | lib/compiler/implementation/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698