mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-14 23:09:22 +00:00
fix regression in source maps
This commit is contained in:
parent
cfef2ec3ba
commit
f72552f100
@ -1236,6 +1236,9 @@ public class JSweetTranspiler implements JSweetOptions {
|
||||
|
||||
initSourceFileJavaPaths(files[permutation[i]], cu);
|
||||
}
|
||||
if (isStats()) {
|
||||
context.stats.tsLineCount += lineCount;
|
||||
}
|
||||
|
||||
context.bundleMode = false;
|
||||
|
||||
@ -1254,7 +1257,10 @@ public class JSweetTranspiler implements JSweetOptions {
|
||||
try {
|
||||
String headers = context.getHeaders();
|
||||
out.print(headers);
|
||||
lineCount += StringUtils.countMatches(headers, "\n");
|
||||
lineCount = StringUtils.countMatches(headers, "\n");
|
||||
if (isStats()) {
|
||||
context.stats.tsLineCount += lineCount;
|
||||
}
|
||||
for (SourceFile f : bundledFiles) {
|
||||
f.getSourceMap().shiftOutputPositions(lineCount);
|
||||
}
|
||||
@ -1291,7 +1297,6 @@ public class JSweetTranspiler implements JSweetOptions {
|
||||
out.close();
|
||||
if (isStats()) {
|
||||
context.stats.tsFileCount++;
|
||||
context.stats.tsLineCount += lineCount;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < orderedCompilationUnits.size(); i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user