aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-16 01:55:35 +0000
committerDavid Robillard <d@drobilla.net>2011-05-16 01:55:35 +0000
commite4df4a24bc60c3d5ff52ac09f0137dcb9c7ebb33 (patch)
treee28e39e4365934524a899a1af796957cd0c4dfa0 /src
parent94b68f0c020653b812e13e054988e2d2c810ce59 (diff)
downloadresp-e4df4a24bc60c3d5ff52ac09f0137dcb9c7ebb33.tar.gz
resp-e4df4a24bc60c3d5ff52ac09f0137dcb9c7ebb33.tar.bz2
resp-e4df4a24bc60c3d5ff52ac09f0137dcb9c7ebb33.zip
Fix pretty-printing of defines with list values.
git-svn-id: http://svn.drobilla.net/resp/trunk@430 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r--src/pprint.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp
index 44a6759..94380b9 100644
--- a/src/pprint.cpp
+++ b/src/pprint.cpp
@@ -160,13 +160,16 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types)
newline(out, indent + 2);
print_list(out, fn, fn->iter_at(2), indent + 2, cenv, types, false);
} else {
- const unsigned child_indent = types ? indent + 2 : indent;
+ const unsigned child_indent = indent + 2;
out << (*i++); // Print symbol
if (types) {
print_annotation(out, tup->list_ref(2), indent + head_width + 1, cenv, true);
newline(out, child_indent);
+ } else if (tup->frrst()->as_tuple()) {
+ newline(out, child_indent);
+ } else {
+ out << " ";
}
- out << " ";
print_to(out, *i++, child_indent, cenv, types);
}
out << ")";