diff options
author | David Robillard <d@drobilla.net> | 2010-12-09 21:45:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-09 21:45:16 +0000 |
commit | 1df0630291669295c4ead131f9271b4e2dbc70a4 (patch) | |
tree | cf16c9053853361cc6e8a83535ef946618b80afc | |
parent | e9aa246739b1266362dad6133cf11f37cc9327c9 (diff) | |
download | resp-1df0630291669295c4ead131f9271b4e2dbc70a4.tar.gz resp-1df0630291669295c4ead131f9271b4e2dbc70a4.tar.bz2 resp-1df0630291669295c4ead131f9271b4e2dbc70a4.zip |
Print def form more tersely (no newline after symbol).
git-svn-id: http://svn.drobilla.net/resp/resp@333 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | src/pprint.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index a2178a5..a4e493c 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -125,13 +125,12 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) out << " "; if (form == "def") { - out << (*i++); // Print symbol + out << (*i++) << " "; // Print symbol if (types) - out << " :" << cenv->type(tup->list_ref(2)); + out << ":" << cenv->type(tup->list_ref(2)) << " "; - // Print value indented on the next line - newline(out, indent + 2); - print_list(out, tup, i, indent + 2, cenv, types, false); + print_to(out, (*i++), indent, cenv, types); + out << ")"; newline(out, 0); } else if (form == "fn") { |