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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2747583003: Parse factory constructors with Fasta. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 AsyncMarker, ProcedureKind; 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
8 8
9 import '../parser/parser.dart' show FormalParameterType, optional; 9 import '../parser/parser.dart' show FormalParameterType, optional;
10 10
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 push(library.addConstructorReference( 593 push(library.addConstructorReference(
594 name, typeArguments, suffix, start.charOffset)); 594 name, typeArguments, suffix, start.charOffset));
595 } 595 }
596 596
597 @override 597 @override
598 void beginFactoryMethod(Token token) { 598 void beginFactoryMethod(Token token) {
599 library.beginNestedDeclaration(null, hasMembers: false); 599 library.beginNestedDeclaration(null, hasMembers: false);
600 } 600 }
601 601
602 @override 602 @override
603 void endFactoryMethod(Token beginToken, Token endToken) { 603 void endFactoryMethod(
604 Token beginToken, Token factoryKeyword, Token endToken) {
604 debugEvent("FactoryMethod"); 605 debugEvent("FactoryMethod");
605 MethodBody kind = pop(); 606 MethodBody kind = pop();
606 ConstructorReferenceBuilder redirectionTarget; 607 ConstructorReferenceBuilder redirectionTarget;
607 if (kind == MethodBody.RedirectingFactoryBody) { 608 if (kind == MethodBody.RedirectingFactoryBody) {
608 redirectionTarget = pop(); 609 redirectionTarget = pop();
609 } 610 }
610 AsyncMarker asyncModifier = pop(); 611 AsyncMarker asyncModifier = pop();
611 List<FormalParameterBuilder> formals = pop(); 612 List<FormalParameterBuilder> formals = pop();
612 var name = pop(); 613 var name = pop();
613 int modifiers = Modifier.validate(pop()); 614 int modifiers = Modifier.validate(pop());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 Link<Token> handleMemberName(Link<Token> identifiers) { 700 Link<Token> handleMemberName(Link<Token> identifiers) {
700 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 701 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
701 return removeNativeClause(identifiers); 702 return removeNativeClause(identifiers);
702 } 703 }
703 704
704 @override 705 @override
705 void debugEvent(String name) { 706 void debugEvent(String name) {
706 // printEvent(name); 707 // printEvent(name);
707 } 708 }
708 } 709 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698