Fixed: Script/Class initializers order of assignment

Changed: Compound script has slot/const traits inside main script initializer
This commit is contained in:
Jindra Petřík
2024-08-17 01:59:54 +02:00
parent 54faceb9a8
commit 4e528c181c
50 changed files with 1521 additions and 465 deletions

View File

@@ -3872,12 +3872,21 @@ public class Graph {
* @throws InterruptedException On interrupt
*/
public static GraphTextWriter graphToString(List<GraphTargetItem> tree, GraphTextWriter writer, LocalData localData) throws InterruptedException {
boolean lastNewLine = false;
for (GraphTargetItem ti : tree) {
if (!ti.isEmpty()) {
ti.toStringSemicoloned(writer, localData);
if (ti.hasSingleNewLineAround() && !lastNewLine) {
writer.newLine();
}
ti.toStringSemicoloned(writer, localData);
if (!ti.handlesNewLine()) {
writer.newLine();
}
lastNewLine = false;
if (ti.hasSingleNewLineAround()) {
writer.newLine();
lastNewLine = true;
}
}
}
return writer;