| 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 mapping that attempts a semantic mapping between | 5 /// Source information system mapping that attempts a semantic mapping between |
| 6 /// offsets of JavaScript code points to offsets of Dart code points. | 6 /// offsets of JavaScript code points to offsets of Dart code points. |
| 7 | 7 |
| 8 library dart2js.source_information.position; | 8 library dart2js.source_information.position; |
| 9 | 9 |
| 10 import '../dart2jslib.dart' show | 10 import '../diagnostics/invariant.dart' show |
| 11 invariant, | 11 invariant; |
| 12 MessageKind, | 12 import '../diagnostics/source_span.dart' show |
| 13 SourceSpan; | 13 SourceSpan; |
| 14 import '../diagnostics/spannable.dart' show |
| 15 NO_LOCATION_SPANNABLE; |
| 14 import '../elements/elements.dart' show | 16 import '../elements/elements.dart' show |
| 15 AstElement, | 17 AstElement, |
| 16 LocalElement; | 18 LocalElement; |
| 17 import '../js/js.dart' as js; | 19 import '../js/js.dart' as js; |
| 18 import '../js/js_source_mapping.dart'; | 20 import '../js/js_source_mapping.dart'; |
| 19 import '../js/js_debug.dart'; | 21 import '../js/js_debug.dart'; |
| 20 import '../tree/tree.dart' show Node, Send; | 22 import '../tree/tree.dart' show |
| 21 import '../util/util.dart' show NO_LOCATION_SPANNABLE; | 23 Node, |
| 24 Send; |
| 22 | 25 |
| 23 import 'source_file.dart'; | 26 import 'source_file.dart'; |
| 24 import 'source_information.dart'; | 27 import 'source_information.dart'; |
| 25 | 28 |
| 26 /// [SourceInformation] that consists of an offset position into the source | 29 /// [SourceInformation] that consists of an offset position into the source |
| 27 /// code. | 30 /// code. |
| 28 class PositionSourceInformation extends SourceInformation { | 31 class PositionSourceInformation extends SourceInformation { |
| 29 @override | 32 @override |
| 30 final SourceLocation startPosition; | 33 final SourceLocation startPosition; |
| 31 | 34 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 453 |
| 451 @override | 454 @override |
| 452 void onPositions(js.Node node, | 455 void onPositions(js.Node node, |
| 453 int startPosition, | 456 int startPosition, |
| 454 int endPosition, | 457 int endPosition, |
| 455 int closingPosition) { | 458 int closingPosition) { |
| 456 codePositions.registerPositions( | 459 codePositions.registerPositions( |
| 457 node, startPosition, endPosition, closingPosition); | 460 node, startPosition, endPosition, closingPosition); |
| 458 } | 461 } |
| 459 } | 462 } |
| OLD | NEW |