aboutsummaryrefslogtreecommitdiffstats
path: root/src/pprint.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-30 21:50:25 +0000
committerDavid Robillard <d@drobilla.net>2010-12-30 21:50:25 +0000
commit4dcee9c7f9e0451ffda6880f3ca32943fb7b1ab7 (patch)
treee0f368793d42bdcb85f2d6c2558c2ea84fb04999 /src/pprint.cpp
parentde74cf9cd95414fb0a9807fd5b59fefdd64f7392 (diff)
downloadresp-4dcee9c7f9e0451ffda6880f3ca32943fb7b1ab7.tar.gz
resp-4dcee9c7f9e0451ffda6880f3ca32943fb7b1ab7.tar.bz2
resp-4dcee9c7f9e0451ffda6880f3ca32943fb7b1ab7.zip
Separate all top-level expressions by a blank line.
git-svn-id: http://svn.drobilla.net/resp/resp@378 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/pprint.cpp')
-rw-r--r--src/pprint.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp
index 48debb1..ba29e3b 100644
--- a/src/pprint.cpp
+++ b/src/pprint.cpp
@@ -144,13 +144,11 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types)
out << " ";
print_to(out, *i++, child_indent, cenv, types);
out << ")";
- newline(out, 0);
} else if (form == "def-type") {
out << (*i++);
newline(out, indent + 2);
print_list(out, tup, i, indent + 2, cenv, types, false);
- newline(out, 0);
} else if (form == "fn") {
// Print prototype (possibly with parameter type annotations)
@@ -205,6 +203,9 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types)
// Print on single line if list contains only atoms
print_list_one_line(out, tup, i, indent + head_width, cenv, types, false);
}
+ if (indent == 0)
+ newline(out, 0);
+
return out;
}
case T_BOOL: