diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-16 14:52:58 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-16 14:52:58 +0000 |
| commit | 911afd790bea9a84cce520ea765c2203ba50c188 (patch) | |
| tree | 73e201f0b40a385642de1c3fbaae8bd05f30a9af /src/main/java/org/zwobble/couscous/backends/python | |
| parent | aa02301717037a48b1fdfbadd26e341213df15b5 (diff) | |
Move Python-specific constructor into python package
Diffstat (limited to 'src/main/java/org/zwobble/couscous/backends/python')
| -rw-r--r-- | src/main/java/org/zwobble/couscous/backends/python/PythonSerializer.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/zwobble/couscous/backends/python/PythonSerializer.java b/src/main/java/org/zwobble/couscous/backends/python/PythonSerializer.java index 6105715..779c1c4 100644 --- a/src/main/java/org/zwobble/couscous/backends/python/PythonSerializer.java +++ b/src/main/java/org/zwobble/couscous/backends/python/PythonSerializer.java @@ -12,7 +12,10 @@ import static com.google.common.collect.Iterables.skip; public class PythonSerializer implements PythonNodeVisitor { public static String serialize(PythonNode node) { - SourceCodeWriter writer = new SourceCodeWriter(); + SourceCodeWriter writer = new SourceCodeWriter( + (writer2, indentation) -> writer2.writeSymbol(":"), + (writer2, indentation) -> {} + ); PythonSerializer serializer = new PythonSerializer(writer); serializer.write(node); return writer.asString(); |
