mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-05 06:34:11 -08:00
C: fix generation of '#line' directive
This commit is contained in:
parent
86b5daa3cf
commit
4c50ed8714
|
@ -182,11 +182,10 @@ public class BufferedCodeWriter extends CodeWriter {
|
||||||
fileName = initialFileName;
|
fileName = initialFileName;
|
||||||
lineNumber = absLineNumber;
|
lineNumber = absLineNumber;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(this.fileName, fileName) || this.lineNumber != lineNumber) {
|
|
||||||
if (isNewLine) {
|
if (isNewLine) {
|
||||||
pendingFileName = fileName;
|
pendingFileName = fileName;
|
||||||
pendingLineNumber = lineNumber;
|
pendingLineNumber = lineNumber;
|
||||||
} else {
|
} else if (!Objects.equals(this.fileName, fileName) || this.lineNumber != lineNumber) {
|
||||||
this.lineNumber++;
|
this.lineNumber++;
|
||||||
absLineNumber++;
|
absLineNumber++;
|
||||||
writer.println();
|
writer.println();
|
||||||
|
@ -195,7 +194,6 @@ public class BufferedCodeWriter extends CodeWriter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static abstract class Fragment {
|
static abstract class Fragment {
|
||||||
abstract void writeTo(WriterWithContext writer);
|
abstract void writeTo(WriterWithContext writer);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user