Skip to content

Commit c9d1fd1

Browse files
committed
fix delegate
1 parent 15ead35 commit c9d1fd1

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/org/sugarj/AbstractBaseProcessor.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
import java.util.ArrayList;
66
import java.util.HashSet;
77
import java.util.List;
8-
import java.util.Map;
9-
import java.util.Map.Entry;
108
import java.util.Set;
119

1210
import org.spoofax.interpreter.terms.IStrategoTerm;
1311
import org.strategoxt.HybridInterpreter;
1412
import org.sugarj.common.ATermCommands;
1513
import org.sugarj.common.Environment;
1614
import org.sugarj.common.FileCommands;
15+
import org.sugarj.common.Log;
1716
import org.sugarj.common.errors.SourceCodeException;
1817
import org.sugarj.common.path.Path;
1918

@@ -45,26 +44,22 @@ public Set<Path> compile(
4544
String source,
4645
Path bin,
4746
List<Path> path,
48-
Map<Path, String> deferredSourceFilesForSourceFile
47+
Set<Path> deferredSourceFilesForSourceFile
4948
) throws IOException, ClassNotFoundException, SourceCodeException {
5049

5150

5251
List<Path> outSourceFiles = new ArrayList<>();
5352
Set<Path> generatedFiles = new HashSet<>();
5453

55-
for (Entry<Path, String> deferredSource : deferredSourceFilesForSourceFile.entrySet()) {
56-
String code = deferredSource.getValue();
57-
58-
writeToFile(generatedFiles, deferredSource.getKey(), code);
59-
outSourceFiles.add(deferredSource.getKey());
60-
}
61-
54+
outSourceFiles.addAll(deferredSourceFilesForSourceFile);
55+
6256
if (!source.isEmpty()) {
6357
writeToFile(generatedFiles, outFile, source);
6458
outSourceFiles.add(outFile);
6559
}
6660

6761
if (!outSourceFiles.isEmpty()) {
62+
Log.log.log("Compile desugared source files " + outSourceFiles, Log.CORE);
6863
List<Path> generatedByCompiler = compile(outSourceFiles, bin, path);
6964
for (Path p : generatedByCompiler)
7065
generatedFiles.add(p);

0 commit comments

Comments
 (0)