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

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

Issue 2963473004: Generate type variable events before parsing return type. (Closed)
Patch Set: Created 3 years, 5 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) 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 ProcedureKind; 7 import 'package:kernel/ast.dart' show ProcedureKind;
8 8
9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
10 10
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 void beginFunctionTypeAlias(Token token) { 609 void beginFunctionTypeAlias(Token token) {
610 library.beginNestedDeclaration(null, hasMembers: false); 610 library.beginNestedDeclaration(null, hasMembers: false);
611 silenceParserErrors = false; 611 silenceParserErrors = false;
612 } 612 }
613 613
614 @override 614 @override
615 void endFunctionType(Token functionToken, Token endToken) { 615 void endFunctionType(Token functionToken, Token endToken) {
616 debugEvent("FunctionType"); 616 debugEvent("FunctionType");
617 List<FormalParameterBuilder> formals = pop(); 617 List<FormalParameterBuilder> formals = pop();
618 pop(); // formals offset 618 pop(); // formals offset
619 TypeBuilder returnType = pop();
619 List<TypeVariableBuilder> typeVariables = pop(); 620 List<TypeVariableBuilder> typeVariables = pop();
620 TypeBuilder returnType = pop();
621 push(library.addFunctionType( 621 push(library.addFunctionType(
622 returnType, typeVariables, formals, functionToken.charOffset)); 622 returnType, typeVariables, formals, functionToken.charOffset));
623 } 623 }
624 624
625 @override 625 @override
626 void endFunctionTypeAlias( 626 void endFunctionTypeAlias(
627 Token typedefKeyword, Token equals, Token endToken) { 627 Token typedefKeyword, Token equals, Token endToken) {
628 debugEvent("endFunctionTypeAlias"); 628 debugEvent("endFunctionTypeAlias");
629 List<FormalParameterBuilder> formals; 629 List<FormalParameterBuilder> formals;
630 List<TypeVariableBuilder> typeVariables; 630 List<TypeVariableBuilder> typeVariables;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 Link<Token> handleMemberName(Link<Token> identifiers) { 859 Link<Token> handleMemberName(Link<Token> identifiers) {
860 if (!enableNative || identifiers.isEmpty) return identifiers; 860 if (!enableNative || identifiers.isEmpty) return identifiers;
861 return removeNativeClause(identifiers); 861 return removeNativeClause(identifiers);
862 } 862 }
863 863
864 @override 864 @override
865 void debugEvent(String name) { 865 void debugEvent(String name) {
866 // printEvent(name); 866 // printEvent(name);
867 } 867 }
868 } 868 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/source/unhandled_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698