OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Convertion of elements between the analyzer element model and the dart2js | 5 /// Convertion of elements between the analyzer element model and the dart2js |
6 /// element model. | 6 /// element model. |
7 | 7 |
8 library analyzer2dart.element_converter; | 8 library analyzer2dart.element_converter; |
9 | 9 |
10 import 'package:compiler/implementation/elements/elements.dart' as dart2js; | 10 import 'package:compiler/src/elements/elements.dart' as dart2js; |
11 import 'package:compiler/implementation/elements/modelx.dart' as modelx; | 11 import 'package:compiler/src/elements/modelx.dart' as modelx; |
12 import 'package:compiler/implementation/util/util.dart' as util; | 12 import 'package:compiler/src/util/util.dart' as util; |
13 import 'package:compiler/implementation/dart_types.dart' as dart2js; | 13 import 'package:compiler/src/dart_types.dart' as dart2js; |
14 import 'package:analyzer/src/generated/element.dart' as analyzer; | 14 import 'package:analyzer/src/generated/element.dart' as analyzer; |
15 | 15 |
16 part 'modely.dart'; | 16 part 'modely.dart'; |
17 | 17 |
18 class ElementConverter { | 18 class ElementConverter { |
19 /// Map from analyzer elements to their equivalent dart2js elements. | 19 /// Map from analyzer elements to their equivalent dart2js elements. |
20 Map<analyzer.Element, dart2js.Element> conversionMap = | 20 Map<analyzer.Element, dart2js.Element> conversionMap = |
21 <analyzer.Element, dart2js.Element>{}; | 21 <analyzer.Element, dart2js.Element>{}; |
22 | 22 |
23 /// Map from dart2js elements to their equivalent analyzer elements. | 23 /// Map from dart2js elements to their equivalent analyzer elements. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 analyzer.LocalVariableElement input) { | 153 analyzer.LocalVariableElement input) { |
154 return new LocalVariableElementY(converter, input); | 154 return new LocalVariableElementY(converter, input); |
155 } | 155 } |
156 | 156 |
157 @override | 157 @override |
158 dart2js.ConstructorElement visitConstructorElement( | 158 dart2js.ConstructorElement visitConstructorElement( |
159 analyzer.ConstructorElement input) { | 159 analyzer.ConstructorElement input) { |
160 return new ConstructorElementY(converter, input); | 160 return new ConstructorElementY(converter, input); |
161 } | 161 } |
162 } | 162 } |
OLD | NEW |