OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.outline_builder; | 5 library fasta.outline_builder; |
6 | 6 |
7 import 'package:kernel/ast.dart' show | 7 import 'package:kernel/ast.dart' show |
8 AsyncMarker, | 8 AsyncMarker, |
9 ProcedureKind; | 9 ProcedureKind; |
10 | 10 |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 void endFactoryMethod(Token beginToken, Token endToken) { | 537 void endFactoryMethod(Token beginToken, Token endToken) { |
538 debugEvent("FactoryMethod"); | 538 debugEvent("FactoryMethod"); |
539 MethodBody kind = pop(); | 539 MethodBody kind = pop(); |
540 ConstructorReferenceBuilder redirectionTarget; | 540 ConstructorReferenceBuilder redirectionTarget; |
541 if (kind == MethodBody.RedirectingFactoryBody) { | 541 if (kind == MethodBody.RedirectingFactoryBody) { |
542 redirectionTarget = pop(); | 542 redirectionTarget = pop(); |
543 } | 543 } |
544 AsyncMarker asyncModifier = pop(); | 544 AsyncMarker asyncModifier = pop(); |
545 List<FormalParameterBuilder> formals = pop(); | 545 List<FormalParameterBuilder> formals = pop(); |
546 var name = pop(); | 546 var name = pop(); |
| 547 int modifiers = Modifier.validate(pop()); |
547 List<MetadataBuilder> metadata = pop(); | 548 List<MetadataBuilder> metadata = pop(); |
548 library.addFactoryMethod(metadata, name, formals, asyncModifier, | 549 library.addFactoryMethod(metadata, modifiers, name, formals, asyncModifier, |
549 redirectionTarget, beginToken.charOffset, nativeMethodName); | 550 redirectionTarget, beginToken.charOffset, nativeMethodName); |
550 nativeMethodName = null; | 551 nativeMethodName = null; |
551 } | 552 } |
552 | 553 |
553 @override | 554 @override |
554 void endRedirectingFactoryBody(Token beginToken, Token endToken) { | 555 void endRedirectingFactoryBody(Token beginToken, Token endToken) { |
555 debugEvent("RedirectingFactoryBody"); | 556 debugEvent("RedirectingFactoryBody"); |
556 push(MethodBody.RedirectingFactoryBody); | 557 push(MethodBody.RedirectingFactoryBody); |
557 } | 558 } |
558 | 559 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 Link<Token> handleMemberName(Link<Token> identifiers) { | 625 Link<Token> handleMemberName(Link<Token> identifiers) { |
625 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 626 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
626 return removeNativeClause(identifiers); | 627 return removeNativeClause(identifiers); |
627 } | 628 } |
628 | 629 |
629 @override | 630 @override |
630 void debugEvent(String name) { | 631 void debugEvent(String name) { |
631 // printEvent(name); | 632 // printEvent(name); |
632 } | 633 } |
633 } | 634 } |
OLD | NEW |