OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @implements {WebInspector.SourceMapFactory} | 7 * @implements {WebInspector.SourceMapFactory} |
8 */ | 8 */ |
9 WebInspector.SASSSourceMapFactory = function() | 9 WebInspector.SASSSourceMapFactory = function() |
10 { | 10 { |
11 this._astService = new WebInspector.ASTService(); | 11 this._astService = new WebInspector.ASTService(); |
12 } | 12 }; |
13 | 13 |
14 WebInspector.SASSSourceMapFactory.prototype = { | 14 WebInspector.SASSSourceMapFactory.prototype = { |
15 /** | 15 /** |
16 * @override | 16 * @override |
17 * @param {!WebInspector.Target} target | 17 * @param {!WebInspector.Target} target |
18 * @param {!WebInspector.SourceMap} sourceMap | 18 * @param {!WebInspector.SourceMap} sourceMap |
19 * @return {!Promise<?WebInspector.SourceMap>} | 19 * @return {!Promise<?WebInspector.SourceMap>} |
20 */ | 20 */ |
21 editableSourceMap: function(target, sourceMap) | 21 editableSourceMap: function(target, sourceMap) |
22 { | 22 { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 */ | 94 */ |
95 function reportError(cssNode, sassNode) | 95 function reportError(cssNode, sassNode) |
96 { | 96 { |
97 var text = WebInspector.UIString("LiveSASS failed to start: %s", sou
rceMap.url()); | 97 var text = WebInspector.UIString("LiveSASS failed to start: %s", sou
rceMap.url()); |
98 text += WebInspector.UIString("\nSourceMap is misaligned: %s != %s",
cssNode.text.trim(), sassNode.text.trim()); | 98 text += WebInspector.UIString("\nSourceMap is misaligned: %s != %s",
cssNode.text.trim(), sassNode.text.trim()); |
99 text += "\ncompiled: " + cssNode.document.url + ":" + (cssNode.range
.startLine + 1) + ":" + (cssNode.range.startColumn + 1); | 99 text += "\ncompiled: " + cssNode.document.url + ":" + (cssNode.range
.startLine + 1) + ":" + (cssNode.range.startColumn + 1); |
100 text += "\nsource: " + sassNode.document.url + ":" + (sassNode.range
.startLine + 1) + ":" + (sassNode.range.startColumn + 1); | 100 text += "\nsource: " + sassNode.document.url + ":" + (sassNode.range
.startLine + 1) + ":" + (sassNode.range.startColumn + 1); |
101 WebInspector.console.error(text); | 101 WebInspector.console.error(text); |
102 } | 102 } |
103 }, | 103 }, |
104 } | 104 }; |
OLD | NEW |