| 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'; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 String get shortText { | 109 String get shortText { |
| 110 return _computeText(startPosition.sourceUri.pathSegments.last); | 110 return _computeText(startPosition.sourceUri.pathSegments.last); |
| 111 } | 111 } |
| 112 | 112 |
| 113 String toString() { | 113 String toString() { |
| 114 return _computeText('${startPosition.sourceUri}'); | 114 return _computeText('${startPosition.sourceUri}'); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 class StartEndSourceInformationStrategy | 118 class StartEndSourceInformationStrategy |
| 119 implements JavaScriptSourceInformationStrategy { | 119 extends JavaScriptSourceInformationStrategy { |
| 120 const StartEndSourceInformationStrategy(); | 120 const StartEndSourceInformationStrategy(); |
| 121 | 121 |
| 122 @override | 122 @override |
| 123 SourceInformationBuilder createBuilderForContext(AstElement element) { | 123 SourceInformationBuilder createBuilderForContext(AstElement element) { |
| 124 return new StartEndSourceInformationBuilder(element); | 124 return new StartEndSourceInformationBuilder(element); |
| 125 } | 125 } |
| 126 | 126 |
| 127 @override | 127 @override |
| 128 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { | 128 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { |
| 129 return new StartEndSourceInformationProcessor(sourceMapper); | 129 return new StartEndSourceInformationProcessor(sourceMapper); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 @override | 226 @override |
| 227 SourceInformationBuilder forContext( | 227 SourceInformationBuilder forContext( |
| 228 AstElement element, {SourceInformation sourceInformation}) { | 228 AstElement element, {SourceInformation sourceInformation}) { |
| 229 return new StartEndSourceInformationBuilder(element); | 229 return new StartEndSourceInformationBuilder(element); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 | 232 |
| 233 | 233 |
| 234 | 234 |
| OLD | NEW |