| 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 '../common.dart'; | 10 import '../common.dart'; |
| 11 import '../diagnostics/messages.dart' show MessageTemplate; | 11 import '../diagnostics/messages.dart' show MessageTemplate; |
| 12 import '../elements/elements.dart' show AstElement, LocalElement; | 12 import '../elements/elements.dart' show AstElement; |
| 13 import '../js/js.dart' as js; | 13 import '../js/js.dart' as js; |
| 14 import '../js/js_source_mapping.dart'; | 14 import '../js/js_source_mapping.dart'; |
| 15 import '../tokens/token.dart' show Token; | 15 import '../tokens/token.dart' show Token; |
| 16 import '../tree/tree.dart' show Node, Send; | 16 import '../tree/tree.dart' show Node; |
| 17 | |
| 18 import 'source_file.dart'; | 17 import 'source_file.dart'; |
| 19 import 'source_information.dart'; | 18 import 'source_information.dart'; |
| 20 | 19 |
| 21 /// Source information that contains start source position and optionally an | 20 /// Source information that contains start source position and optionally an |
| 22 /// end source position. | 21 /// end source position. |
| 23 class StartEndSourceInformation extends SourceInformation { | 22 class StartEndSourceInformation extends SourceInformation { |
| 24 @override | 23 @override |
| 25 final SourceLocation startPosition; | 24 final SourceLocation startPosition; |
| 26 | 25 |
| 27 @override | 26 @override |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 216 |
| 218 @override | 217 @override |
| 219 SourceInformation buildIf(Node node) => buildGeneric(node); | 218 SourceInformation buildIf(Node node) => buildGeneric(node); |
| 220 | 219 |
| 221 @override | 220 @override |
| 222 SourceInformationBuilder forContext(AstElement element, | 221 SourceInformationBuilder forContext(AstElement element, |
| 223 {SourceInformation sourceInformation}) { | 222 {SourceInformation sourceInformation}) { |
| 224 return new StartEndSourceInformationBuilder(element); | 223 return new StartEndSourceInformationBuilder(element); |
| 225 } | 224 } |
| 226 } | 225 } |
| OLD | NEW |