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 /// Source information system that maps spans of Dart AST nodes to spans of | 5 /// Source information system that maps spans of Dart AST nodes to spans of |
6 /// JavaScript nodes. | 6 /// JavaScript nodes. |
7 | 7 |
8 library dart2js.source_information.start_end; | 8 library dart2js.source_information.start_end; |
9 | 9 |
| 10 import '../diagnostics/messages.dart' show |
| 11 MessageKind, |
| 12 MessageTemplate; |
10 import '../diagnostics/source_span.dart' show | 13 import '../diagnostics/source_span.dart' show |
11 SourceSpan; | 14 SourceSpan; |
12 import '../elements/elements.dart' show | 15 import '../elements/elements.dart' show |
13 AstElement, | 16 AstElement, |
14 LocalElement; | 17 LocalElement; |
15 import '../js/js.dart' as js; | 18 import '../js/js.dart' as js; |
16 import '../js/js_source_mapping.dart'; | 19 import '../js/js_source_mapping.dart'; |
17 import '../messages.dart' show | |
18 MessageKind, | |
19 MessageTemplate; | |
20 import '../scanner/scannerlib.dart' show Token; | 20 import '../scanner/scannerlib.dart' show Token; |
21 import '../tree/tree.dart' show Node, Send; | 21 import '../tree/tree.dart' show Node, Send; |
22 | 22 |
23 import 'source_file.dart'; | 23 import 'source_file.dart'; |
24 import 'source_information.dart'; | 24 import 'source_information.dart'; |
25 | 25 |
26 /// Source information that contains start source position and optionally an | 26 /// Source information that contains start source position and optionally an |
27 /// end source position. | 27 /// end source position. |
28 class StartEndSourceInformation extends SourceInformation { | 28 class StartEndSourceInformation extends SourceInformation { |
29 @override | 29 @override |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 @override | 228 @override |
229 SourceInformationBuilder forContext( | 229 SourceInformationBuilder forContext( |
230 AstElement element, {SourceInformation sourceInformation}) { | 230 AstElement element, {SourceInformation sourceInformation}) { |
231 return new StartEndSourceInformationBuilder(element); | 231 return new StartEndSourceInformationBuilder(element); |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
235 | 235 |
236 | 236 |
OLD | NEW |