diff options
author | David Robillard <d@drobilla.net> | 2010-12-09 22:14:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-09 22:14:32 +0000 |
commit | b078303aa8fa31728a8351587a0796e76301d575 (patch) | |
tree | a9959db8fefda0ada23b40b74443bb245da7120b | |
parent | 1df0630291669295c4ead131f9271b4e2dbc70a4 (diff) | |
download | resp-b078303aa8fa31728a8351587a0796e76301d575.tar.gz resp-b078303aa8fa31728a8351587a0796e76301d575.tar.bz2 resp-b078303aa8fa31728a8351587a0796e76301d575.zip |
Print newlines after def symbol if type annotation is printed.
git-svn-id: http://svn.drobilla.net/resp/resp@334 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | src/pprint.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index a4e493c..92898ac 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -126,10 +126,13 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) if (form == "def") { out << (*i++) << " "; // Print symbol - if (types) + unsigned child_indent = types ? indent + 2 : indent; + if (types) { out << ":" << cenv->type(tup->list_ref(2)) << " "; + newline(out, child_indent); + } - print_to(out, (*i++), indent, cenv, types); + print_to(out, (*i++), child_indent, cenv, types); out << ")"; newline(out, 0); |