| 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 library js.source_mapping; | 5 library js.source_mapping; |
| 6 | 6 |
| 7 import 'js.dart'; | 7 import '../io/code_output.dart' show BufferedCodeOutput, SourceLocations; |
| 8 import '../io/code_output.dart' | |
| 9 show BufferedCodeOutput, CodeBuffer, SourceLocations; | |
| 10 import '../io/source_information.dart' | 8 import '../io/source_information.dart' |
| 11 show SourceLocation, SourceInformation, SourceInformationStrategy; | 9 show SourceLocation, SourceInformation, SourceInformationStrategy; |
| 10 import 'js.dart'; |
| 12 | 11 |
| 13 /// [SourceInformationStrategy] that can associate source information with | 12 /// [SourceInformationStrategy] that can associate source information with |
| 14 /// JavaScript output. | 13 /// JavaScript output. |
| 15 class JavaScriptSourceInformationStrategy extends SourceInformationStrategy { | 14 class JavaScriptSourceInformationStrategy extends SourceInformationStrategy { |
| 16 const JavaScriptSourceInformationStrategy(); | 15 const JavaScriptSourceInformationStrategy(); |
| 17 | 16 |
| 18 /// Creates a processor that can associate source information on [Node] with | 17 /// Creates a processor that can associate source information on [Node] with |
| 19 /// code offsets in the [sourceMapper]. | 18 /// code offsets in the [sourceMapper]. |
| 20 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { | 19 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { |
| 21 return const SourceInformationProcessor(); | 20 return const SourceInformationProcessor(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 53 |
| 55 /// A processor that associates [SourceInformation] with code position of | 54 /// A processor that associates [SourceInformation] with code position of |
| 56 /// JavaScript [Node]s. | 55 /// JavaScript [Node]s. |
| 57 class SourceInformationProcessor extends CodePositionListener { | 56 class SourceInformationProcessor extends CodePositionListener { |
| 58 const SourceInformationProcessor(); | 57 const SourceInformationProcessor(); |
| 59 | 58 |
| 60 /// Process the source information and code positions for the [node] and all | 59 /// Process the source information and code positions for the [node] and all |
| 61 /// its children. | 60 /// its children. |
| 62 void process(Node node, BufferedCodeOutput code) {} | 61 void process(Node node, BufferedCodeOutput code) {} |
| 63 } | 62 } |
| OLD | NEW |