diff --git a/core/src/main/java/org/lflang/generator/CodeBuilder.java b/core/src/main/java/org/lflang/generator/CodeBuilder.java index 9fe82e46fd..af82d70512 100644 --- a/core/src/main/java/org/lflang/generator/CodeBuilder.java +++ b/core/src/main/java/org/lflang/generator/CodeBuilder.java @@ -126,7 +126,8 @@ public void prSourceLineNumber(EObject eObject, boolean suppress) { } } // Extract the filename from eResource, an astonishingly difficult thing to do. - String filePath = CommonPlugin.resolve(eObject.eResource().getURI()).path(); + String filePath = + CommonPlugin.resolve(eObject.eResource().getURI()).path().replace("\\", "\\\\"); pr("#line " + (node.getStartLine() + offset) + " \"" + filePath + "\""); } } @@ -558,7 +559,11 @@ public CodeMap writeToFile(String path) throws IOException { for (var line : (Iterable) () -> s.lines().iterator()) { lineNumber++; if (line.contains(END_SOURCE_LINE_NUMBER_TAG) && !path.endsWith(".ino")) { - out.append("#line ").append(lineNumber).append(" \"").append(path).append("\""); + out.append("#line ") + .append(lineNumber) + .append(" \"") + .append(path.replace("\\", "\\\\")) + .append("\""); } else { out.append(line); } diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index aaa38d8cbb..b67cdadf98 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit aaa38d8cbb6155fd3d25bc50c432de3423396473 +Subproject commit b67cdadf9881346bf8693d245c4bc48dec68150a