diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-04-14 21:08:58 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-04-14 21:08:58 +0100 |
| commit | 70dff9fc275622c1faf5558b998f8e6626feb822 (patch) | |
| tree | dc0d5cdfd860992f619748f24f1d1ce97e56f285 /src/main/java | |
| parent | 515a1e5f9881d4de452d395aaf9223420ced5261 (diff) | |
Change CsharpBackend to take output file path
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java b/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java index 7785ec5..380d84f 100644 --- a/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java +++ b/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java @@ -24,19 +24,19 @@ public class CsharpBackend implements Backend { "java/lang/Iterable.cs", "java/util/Iterator.cs"); - private final Path directoryPath; + private final Path outputFilePath; private final String namespace; - public CsharpBackend(Path directoryPath, String namespace) { - this.directoryPath = directoryPath; + public CsharpBackend(Path outputFilePath, String namespace) { + this.outputFilePath = outputFilePath; this.namespace = namespace; } @Override public void compile(List<TypeNode> classes) throws IOException { - directoryPath.toFile().mkdirs(); + outputFilePath.getParent().toFile().mkdirs(); Files.write( - directoryPath.resolve("Program.cs"), + outputFilePath, Iterables.<String>concat( transform( classes, |
