Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:collection' show IterableMixin; | 5 import 'dart:collection' show IterableMixin; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../elements/elements.dart' show MetadataAnnotation; | 8 import '../elements/elements.dart' show MetadataAnnotation; |
| 9 import '../resolution/secret_tree_element.dart' | 9 import '../resolution/secret_tree_element.dart' |
| 10 show NullTreeElementMixin, StoredTreeElementMixin; | 10 show NullTreeElementMixin, StoredTreeElementMixin; |
| (...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1728 accept1(Visitor1 visitor, arg) => visitor.visitRethrow(this, arg); | 1728 accept1(Visitor1 visitor, arg) => visitor.visitRethrow(this, arg); |
| 1729 | 1729 |
| 1730 visitChildren(Visitor visitor) {} | 1730 visitChildren(Visitor visitor) {} |
| 1731 | 1731 |
| 1732 visitChildren1(Visitor1 visitor, arg) {} | 1732 visitChildren1(Visitor1 visitor, arg) {} |
| 1733 | 1733 |
| 1734 Token getBeginToken() => throwToken; | 1734 Token getBeginToken() => throwToken; |
| 1735 Token getEndToken() => endToken; | 1735 Token getEndToken() => endToken; |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 abstract class TypeAnnotation extends Node { | 1738 abstract class TypeAnnotation extends Node {} |
| 1739 } | |
| 1740 | 1739 |
| 1741 class NominalTypeAnnotation extends TypeAnnotation { | 1740 class NominalTypeAnnotation extends TypeAnnotation { |
| 1742 final Expression typeName; | 1741 final Expression typeName; |
| 1743 final NodeList typeArguments; | 1742 final NodeList typeArguments; |
| 1744 | 1743 |
| 1745 NominalTypeAnnotation(this.typeName, this.typeArguments); | 1744 NominalTypeAnnotation(this.typeName, this.typeArguments); |
| 1746 | 1745 |
| 1747 NominalTypeAnnotation asNominalTypeAnnotation() => this; | 1746 NominalTypeAnnotation asNominalTypeAnnotation() => this; |
| 1748 | 1747 |
| 1749 accept(Visitor visitor) => visitor.visitNominalTypeAnnotation(this); | 1748 accept(Visitor visitor) => visitor.visitNominalTypeAnnotation(this); |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2884 | 2883 |
| 2885 /// Parameters to the template. | 2884 /// Parameters to the template. |
| 2886 /// | 2885 /// |
| 2887 /// For example, `T` and `S` are template parameters in the following | 2886 /// For example, `T` and `S` are template parameters in the following |
| 2888 /// typedef: `typedef F<S, T> = Function(S, T)`, or, in the inlined syntax, | 2887 /// typedef: `typedef F<S, T> = Function(S, T)`, or, in the inlined syntax, |
| 2889 /// `typedef F<S, T>(S x, T y)`. | 2888 /// `typedef F<S, T>(S x, T y)`. |
| 2890 final NodeList templateParameters; | 2889 final NodeList templateParameters; |
| 2891 | 2890 |
| 2892 final TypeAnnotation returnType; | 2891 final TypeAnnotation returnType; |
| 2893 final Identifier name; | 2892 final Identifier name; |
| 2893 | |
| 2894 /// The generic type parameters to the function type. | 2894 /// The generic type parameters to the function type. |
| 2895 /// | 2895 /// |
| 2896 /// For example `A` and `B` (but not `T`) are type parameters in | 2896 /// For example `A` and `B` (but not `T`) are type parameters in |
| 2897 /// `typedef F<T> = Function<A, B>(A, B, T)`; | 2897 /// `typedef F<T> = Function<A, B>(A, B, T)`; |
| 2898 final NodeList typeParameters; | 2898 final NodeList typeParameters; |
| 2899 final NodeList formals; | 2899 final NodeList formals; |
| 2900 | 2900 |
| 2901 final Token typedefKeyword; | 2901 final Token typedefKeyword; |
| 2902 final Token endToken; | 2902 final Token endToken; |
| 2903 | 2903 |
| 2904 Typedef(this.isGeneralizedTypeAlias, this.templateParameters, this.returnType, | 2904 Typedef( |
| 2905 this.name, this.typeParameters, this.formals, this.typedefKeyword, | 2905 this.isGeneralizedTypeAlias, |
|
Siggi Cherem (dart-lang)
2017/01/18 19:27:53
FYI I reverted the generalized type alias change,
| |
| 2906 this.templateParameters, | |
| 2907 this.returnType, | |
| 2908 this.name, | |
| 2909 this.typeParameters, | |
| 2910 this.formals, | |
| 2911 this.typedefKeyword, | |
| 2906 this.endToken); | 2912 this.endToken); |
| 2907 | 2913 |
| 2908 Typedef asTypedef() => this; | 2914 Typedef asTypedef() => this; |
| 2909 | 2915 |
| 2910 accept(Visitor visitor) => visitor.visitTypedef(this); | 2916 accept(Visitor visitor) => visitor.visitTypedef(this); |
| 2911 | 2917 |
| 2912 accept1(Visitor1 visitor, arg) => visitor.visitTypedef(this, arg); | 2918 accept1(Visitor1 visitor, arg) => visitor.visitTypedef(this, arg); |
| 2913 | 2919 |
| 2914 visitChildren(Visitor visitor) { | 2920 visitChildren(Visitor visitor) { |
| 2915 if (templateParameters != null) templateParameters.accept(visitor); | 2921 if (templateParameters != null) templateParameters.accept(visitor); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3212 get metadata => null; | 3218 get metadata => null; |
| 3213 get type => null; | 3219 get type => null; |
| 3214 | 3220 |
| 3215 // Typedef. | 3221 // Typedef. |
| 3216 get isGeneralizedTypeAlias => null; | 3222 get isGeneralizedTypeAlias => null; |
| 3217 get templateParameters => null; | 3223 get templateParameters => null; |
| 3218 get typeParameters => null; | 3224 get typeParameters => null; |
| 3219 get formals => null; | 3225 get formals => null; |
| 3220 get typedefKeyword => null; | 3226 get typedefKeyword => null; |
| 3221 } | 3227 } |
| OLD | NEW |