| 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 '../dart2jslib.dart' show | 10 import '../dart2jslib.dart' show |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 sourceFileLocationForToken(node.getEndToken())); | 196 sourceFileLocationForToken(node.getEndToken())); |
| 197 } | 197 } |
| 198 | 198 |
| 199 @override | 199 @override |
| 200 SourceInformation buildGeneric(Node node) { | 200 SourceInformation buildGeneric(Node node) { |
| 201 return new StartEndSourceInformation( | 201 return new StartEndSourceInformation( |
| 202 sourceFileLocationForToken(node.getBeginToken())); | 202 sourceFileLocationForToken(node.getBeginToken())); |
| 203 } | 203 } |
| 204 | 204 |
| 205 @override | 205 @override |
| 206 SourceInformation buildReturn(Node node) { | 206 SourceInformation buildCreate(Node node) => buildGeneric(node); |
| 207 return buildGeneric(node); | 207 |
| 208 } | 208 @override |
| 209 SourceInformation buildReturn(Node node) => buildGeneric(node); |
| 209 | 210 |
| 210 @override | 211 @override |
| 211 SourceInformation buildGet(Node node) => buildGeneric(node); | 212 SourceInformation buildGet(Node node) => buildGeneric(node); |
| 212 | 213 |
| 213 @override | 214 @override |
| 214 SourceInformation buildAssignment(Node node) => buildGeneric(node); | 215 SourceInformation buildAssignment(Node node) => buildGeneric(node); |
| 215 | 216 |
| 216 @override | 217 @override |
| 217 SourceInformation buildCall(Node receiver, Node call) { | 218 SourceInformation buildCall(Node receiver, Node call) { |
| 218 return buildGeneric(receiver); | 219 return buildGeneric(receiver); |
| 219 } | 220 } |
| 220 | 221 |
| 221 @override | 222 @override |
| 222 SourceInformation buildIf(Node node) => buildGeneric(node); | 223 SourceInformation buildIf(Node node) => buildGeneric(node); |
| 223 | 224 |
| 224 @override | 225 @override |
| 225 SourceInformationBuilder forContext( | 226 SourceInformationBuilder forContext( |
| 226 AstElement element, {SourceInformation sourceInformation}) { | 227 AstElement element, {SourceInformation sourceInformation}) { |
| 227 return new StartEndSourceInformationBuilder(element); | 228 return new StartEndSourceInformationBuilder(element); |
| 228 } | 229 } |
| 229 } | 230 } |
| 230 | 231 |
| 231 | 232 |
| 232 | 233 |
| OLD | NEW |