OLD | NEW |
---|---|
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 Loading... | |
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 } |
OLD | NEW |