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 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 debugEvent("FunctionType"); | 612 debugEvent("FunctionType"); |
613 List<FormalParameterBuilder> formals = pop(); | 613 List<FormalParameterBuilder> formals = pop(); |
614 pop(); // formals offset | 614 pop(); // formals offset |
615 TypeBuilder returnType = pop(); | 615 TypeBuilder returnType = pop(); |
616 List<TypeVariableBuilder> typeVariables = pop(); | 616 List<TypeVariableBuilder> typeVariables = pop(); |
617 push(library.addFunctionType( | 617 push(library.addFunctionType( |
618 returnType, typeVariables, formals, functionToken.charOffset)); | 618 returnType, typeVariables, formals, functionToken.charOffset)); |
619 } | 619 } |
620 | 620 |
621 @override | 621 @override |
622 void endFunctionTypedFormalParameter( | 622 void endFunctionTypedFormalParameter() { |
623 Token thisKeyword, FormalParameterType kind) { | |
624 debugEvent("FunctionTypedFormalParameter"); | 623 debugEvent("FunctionTypedFormalParameter"); |
625 List<FormalParameterBuilder> formals = pop(); | 624 List<FormalParameterBuilder> formals = pop(); |
626 int formalsOffset = pop(); | 625 int formalsOffset = pop(); |
| 626 TypeBuilder returnType = pop(); |
627 List<TypeVariableBuilder> typeVariables = pop(); | 627 List<TypeVariableBuilder> typeVariables = pop(); |
628 int charOffset = pop(); | |
629 String name = pop(); | |
630 TypeBuilder returnType = pop(); | |
631 push(library.addFunctionType( | 628 push(library.addFunctionType( |
632 returnType, typeVariables, formals, formalsOffset)); | 629 returnType, typeVariables, formals, formalsOffset)); |
633 push(name); | |
634 push(charOffset); | |
635 } | 630 } |
636 | 631 |
637 @override | 632 @override |
638 void endFunctionTypeAlias( | 633 void endFunctionTypeAlias( |
639 Token typedefKeyword, Token equals, Token endToken) { | 634 Token typedefKeyword, Token equals, Token endToken) { |
640 debugEvent("endFunctionTypeAlias"); | 635 debugEvent("endFunctionTypeAlias"); |
641 List<TypeVariableBuilder> typeVariables; | 636 List<TypeVariableBuilder> typeVariables; |
642 String name; | 637 String name; |
643 int charOffset; | 638 int charOffset; |
644 FunctionTypeBuilder functionType; | 639 FunctionTypeBuilder functionType; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 Link<Token> handleMemberName(Link<Token> identifiers) { | 869 Link<Token> handleMemberName(Link<Token> identifiers) { |
875 if (!enableNative || identifiers.isEmpty) return identifiers; | 870 if (!enableNative || identifiers.isEmpty) return identifiers; |
876 return removeNativeClause(identifiers); | 871 return removeNativeClause(identifiers); |
877 } | 872 } |
878 | 873 |
879 @override | 874 @override |
880 void debugEvent(String name) { | 875 void debugEvent(String name) { |
881 // printEvent(name); | 876 // printEvent(name); |
882 } | 877 } |
883 } | 878 } |
OLD | NEW |