| Index: dart/lib/compiler/implementation/patch_parser.dart
|
| diff --git a/dart/lib/compiler/implementation/patch_parser.dart b/dart/lib/compiler/implementation/patch_parser.dart
|
| index 4ea29b45cbeef6b9e44b3472f1f9bf186d2ef70c..227b7f40e6a1426249f30706f5310f6a9d31b728 100644
|
| --- a/dart/lib/compiler/implementation/patch_parser.dart
|
| +++ b/dart/lib/compiler/implementation/patch_parser.dart
|
| @@ -146,7 +146,6 @@ class PatchParser extends PartialParser {
|
| }
|
| }
|
|
|
| -
|
| /**
|
| * Partial parser for patch files that also handles the members of class
|
| * declarations.
|
| @@ -157,7 +156,6 @@ class PatchClassElementParser extends PatchParser {
|
| Token parseClassBody(Token token) => fullParseClassBody(token);
|
| }
|
|
|
| -
|
| /**
|
| * Extension of [ElementListener] for parsing patch files.
|
| */
|
| @@ -172,6 +170,12 @@ class PatchElementListener extends ElementListener implements PatchListener {
|
| this.imports)
|
| : super(listener, patchElement, idGenerator);
|
|
|
| + MetadataAnnotation popMetadata() {
|
| + // TODO(ahe): Remove this method.
|
| + popNode(); // Discard null.
|
| + return new PatchMetadataAnnotation();
|
| + }
|
| +
|
| void beginPatch(Token token) {
|
| if (token.next.stringValue === "class") {
|
| isClassPatch = true;
|
| @@ -203,7 +207,7 @@ class PatchElementListener extends ElementListener implements PatchListener {
|
| void pushElement(Element element) {
|
| if (isMemberPatch || (isClassPatch && element is ClassElement)) {
|
| // Apply patch.
|
| - element.addMetadata(popNode());
|
| + element.addMetadata(popMetadata());
|
| LibraryElement library = compilationUnitElement.getLibrary();
|
| Element existing = library.localLookup(element.name);
|
| if (isMemberPatch) {
|
| @@ -251,7 +255,6 @@ class PatchElementListener extends ElementListener implements PatchListener {
|
| }
|
| }
|
|
|
| -
|
| /**
|
| * Extension of [MemberListener] for parsing patch class bodies.
|
| */
|
| @@ -262,6 +265,12 @@ class PatchMemberListener extends MemberListener implements PatchListener {
|
| Element enclosingElement)
|
| : super(listener, enclosingElement);
|
|
|
| + MetadataAnnotation popMetadata() {
|
| + // TODO(ahe): Remove this method.
|
| + popNode(); // Discard null.
|
| + return new PatchMetadataAnnotation();
|
| + }
|
| +
|
| void beginPatch(Token token) {
|
| if (token.next.stringValue === "class") {
|
| isClassPatch = true;
|
| @@ -281,8 +290,13 @@ class PatchMemberListener extends MemberListener implements PatchListener {
|
|
|
| void addMember(Element element) {
|
| if (isMemberPatch || (isClassPatch && element is ClassElement)) {
|
| - element.addMetadata(popNode());
|
| + element.addMetadata(popMetadata());
|
| }
|
| super.addMember(element);
|
| }
|
| }
|
| +
|
| +// TODO(ahe): Get rid of this class.
|
| +class PatchMetadataAnnotation extends MetadataAnnotation {
|
| + final Constant value = null;
|
| +}
|
|
|