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.element_listener; | 5 library dart2js.parser.element_listener; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../diagnostics/messages.dart' show MessageTemplate; | 8 import '../diagnostics/messages.dart' show MessageTemplate; |
9 import '../elements/elements.dart' | 9 import '../elements/elements.dart' |
10 show Element, LibraryElement, MetadataAnnotation; | 10 show Element, LibraryElement, MetadataAnnotation; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 popNode(); // returnType | 266 popNode(); // returnType |
267 pushElement(new PartialTypedefElement( | 267 pushElement(new PartialTypedefElement( |
268 name.source, compilationUnitElement, typedefKeyword, endToken)); | 268 name.source, compilationUnitElement, typedefKeyword, endToken)); |
269 rejectBuiltInIdentifier(name); | 269 rejectBuiltInIdentifier(name); |
270 } | 270 } |
271 | 271 |
272 void endNamedMixinApplication( | 272 void endNamedMixinApplication( |
273 Token classKeyword, Token implementsKeyword, Token endToken) { | 273 Token classKeyword, Token implementsKeyword, Token endToken) { |
274 NodeList interfaces = (implementsKeyword != null) ? popNode() : null; | 274 NodeList interfaces = (implementsKeyword != null) ? popNode() : null; |
275 MixinApplication mixinApplication = popNode(); | 275 MixinApplication mixinApplication = popNode(); |
276 Modifiers modifiers = popNode(); | |
277 NodeList typeParameters = popNode(); | 276 NodeList typeParameters = popNode(); |
278 Identifier name = popNode(); | 277 Identifier name = popNode(); |
| 278 Modifiers modifiers = popNode(); |
279 NamedMixinApplication namedMixinApplication = new NamedMixinApplication( | 279 NamedMixinApplication namedMixinApplication = new NamedMixinApplication( |
280 name, | 280 name, |
281 typeParameters, | 281 typeParameters, |
282 modifiers, | 282 modifiers, |
283 mixinApplication, | 283 mixinApplication, |
284 interfaces, | 284 interfaces, |
285 classKeyword, | 285 classKeyword, |
286 endToken); | 286 endToken); |
287 | 287 |
288 int id = idGenerator.getNextFreeId(); | 288 int id = idGenerator.getNextFreeId(); |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 void reportErrorHelper(Spannable spannable, MessageKind errorCode, | 747 void reportErrorHelper(Spannable spannable, MessageKind errorCode, |
748 [Map arguments = const {}]) { | 748 [Map arguments = const {}]) { |
749 if (currentMemberHasParseError) return; // Error already reported. | 749 if (currentMemberHasParseError) return; // Error already reported. |
750 if (suppressParseErrors) return; | 750 if (suppressParseErrors) return; |
751 if (!memberErrors.isEmpty) { | 751 if (!memberErrors.isEmpty) { |
752 memberErrors = memberErrors.tail.prepend(true); | 752 memberErrors = memberErrors.tail.prepend(true); |
753 } | 753 } |
754 reporter.reportErrorMessage(spannable, errorCode, arguments); | 754 reporter.reportErrorMessage(spannable, errorCode, arguments); |
755 } | 755 } |
756 } | 756 } |
OLD | NEW |