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

Side by Side Diff: pkg/compiler/lib/src/parser/member_listener.dart

Issue 2385643003: Fixes in dart2js parser to be able to parse files without the diet-parser (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.parser.member_listener; 5 library dart2js.parser.member_listener;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../elements/elements.dart' show Element, ElementKind, Elements; 8 import '../elements/elements.dart' show Element, ElementKind, Elements;
9 import '../elements/modelx.dart' 9 import '../elements/modelx.dart'
10 show ClassElementX, ElementX, FieldElementX, VariableList; 10 show ClassElementX, ElementX, FieldElementX, VariableList;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void addMetadata(ElementX memberElement) { 140 void addMetadata(ElementX memberElement) {
141 memberElement.metadata = metadata.toList(); 141 memberElement.metadata = metadata.toList();
142 } 142 }
143 143
144 void addMember(ElementX memberElement) { 144 void addMember(ElementX memberElement) {
145 addMetadata(memberElement); 145 addMetadata(memberElement);
146 enclosingClass.addMember(memberElement, reporter); 146 enclosingClass.addMember(memberElement, reporter);
147 } 147 }
148 148
149 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) { 149 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
150 popNode(); // Discard arguments. 150 super.endMetadata(beginToken, periodBeforeName, endToken);
Siggi Cherem (dart-lang) 2016/09/30 22:28:07 note: this will keep the metadata node in the stac
151 if (periodBeforeName != null) {
152 popNode(); // Discard name.
153 }
154 popNode(); // Discard node (Send or Identifier).
155 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken)); 151 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken));
156 } 152 }
157 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698