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