OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; | 5 import 'package:analyzer/dart/ast/ast.dart' hide ConstantEvaluator; |
6 import 'package:analyzer/src/generated/element.dart'; | 6 import 'package:analyzer/dart/element/element.dart'; |
| 7 import 'package:analyzer/dart/element/type.dart'; |
7 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; | 8 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; |
8 | 9 |
9 import '../js/js_ast.dart' as JS show Node, Expression, TypeRef; | 10 import '../js/js_ast.dart' as JS show Node, Expression, TypeRef; |
10 | 11 |
11 import 'closure_annotation.dart'; | 12 import 'closure_annotation.dart'; |
12 | 13 |
13 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types. | 14 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types. |
14 abstract class ClosureAnnotator { | 15 abstract class ClosureAnnotator { |
15 TypeProvider get types; | 16 TypeProvider get types; |
16 | 17 |
(...skipping 15 matching lines...) Expand all Loading... |
32 type: e is VariableElement | 33 type: e is VariableElement |
33 ? emitTypeRef(e.type /*, forceTypeDefExpansion: true*/) | 34 ? emitTypeRef(e.type /*, forceTypeDefExpansion: true*/) |
34 : null, | 35 : null, |
35 superType: e is ClassElement ? emitTypeRef(e.supertype) : null, | 36 superType: e is ClassElement ? emitTypeRef(e.supertype) : null, |
36 interfaces: | 37 interfaces: |
37 e is ClassElement ? e.interfaces.map(emitTypeRef).toList() : null, | 38 e is ClassElement ? e.interfaces.map(emitTypeRef).toList() : null, |
38 isOverride: e.isOverride, | 39 isOverride: e.isOverride, |
39 isTypedef: e is FunctionTypeAliasElement); | 40 isTypedef: e is FunctionTypeAliasElement); |
40 } | 41 } |
41 } | 42 } |
OLD | NEW |