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.kernel_library_builder; | 5 library fasta.kernel_library_builder; |
6 | 6 |
7 import 'package:front_end/src/scanner/token.dart' show Token; | 7 import 'package:front_end/src/scanner/token.dart' show Token; |
8 | 8 |
9 import 'package:kernel/ast.dart'; | 9 import 'package:kernel/ast.dart'; |
10 | 10 |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 // Nested declaration began in `OutlineBuilder.beginFunctionTypeAlias`. | 614 // Nested declaration began in `OutlineBuilder.beginFunctionTypeAlias`. |
615 endNestedDeclaration().resolveTypes(typeVariables, this); | 615 endNestedDeclaration().resolveTypes(typeVariables, this); |
616 addBuilder(name, typedef, charOffset); | 616 addBuilder(name, typedef, charOffset); |
617 } | 617 } |
618 | 618 |
619 KernelFunctionTypeBuilder addFunctionType( | 619 KernelFunctionTypeBuilder addFunctionType( |
620 KernelTypeBuilder returnType, | 620 KernelTypeBuilder returnType, |
621 List<TypeVariableBuilder> typeVariables, | 621 List<TypeVariableBuilder> typeVariables, |
622 List<FormalParameterBuilder> formals, | 622 List<FormalParameterBuilder> formals, |
623 int charOffset) { | 623 int charOffset) { |
624 return new KernelFunctionTypeBuilder( | 624 return addType(new KernelFunctionTypeBuilder( |
625 charOffset, fileUri, returnType, typeVariables, formals); | 625 charOffset, fileUri, returnType, typeVariables, formals)); |
626 } | 626 } |
627 | 627 |
628 KernelFormalParameterBuilder addFormalParameter( | 628 KernelFormalParameterBuilder addFormalParameter( |
629 List<MetadataBuilder> metadata, | 629 List<MetadataBuilder> metadata, |
630 int modifiers, | 630 int modifiers, |
631 KernelTypeBuilder type, | 631 KernelTypeBuilder type, |
632 String name, | 632 String name, |
633 bool hasThis, | 633 bool hasThis, |
634 int charOffset) { | 634 int charOffset) { |
635 return new KernelFormalParameterBuilder( | 635 return new KernelFormalParameterBuilder( |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 mixinApplicationClasses.putIfAbsent(name, () => builder); | 847 mixinApplicationClasses.putIfAbsent(name, () => builder); |
848 if (existing != builder) { | 848 if (existing != builder) { |
849 part.scope.local.remove(name); | 849 part.scope.local.remove(name); |
850 } | 850 } |
851 }); | 851 }); |
852 super.includePart(part); | 852 super.includePart(part); |
853 nativeMethods.addAll(part.nativeMethods); | 853 nativeMethods.addAll(part.nativeMethods); |
854 boundlessTypeVariables.addAll(part.boundlessTypeVariables); | 854 boundlessTypeVariables.addAll(part.boundlessTypeVariables); |
855 } | 855 } |
856 } | 856 } |
OLD | NEW |