From d15593d1cda3e7c56cccc4958d6e07f8f15c90f3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 13 Apr 2010 04:14:39 +0000 Subject: Slightly less terrible "pretty" printing. git-svn-id: http://svn.drobilla.net/resp/resp@255 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/pprint.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/pprint.cpp b/src/pprint.cpp index 7dd36c5..5ee5736 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -82,11 +82,11 @@ pprint_internal(ostream& out, const AST* ast, unsigned indent) unsigned child_indent = indent; if (tup->size() > 1) { out << " "; - if (headSym && headSym->cppstr == "fn") { + if (headSym && (headSym->cppstr == "fn" || headSym->cppstr == "def")) { out << *i; - child_indent = indent + 4; + child_indent = indent + 2; } else { - child_indent += head.length() + 1; + child_indent += head.length() + 2; pprint_internal(out, *i, child_indent); } } @@ -95,8 +95,8 @@ pprint_internal(ostream& out, const AST* ast, unsigned indent) pprint_internal(out, *i, child_indent); } out << ")"; - if (headSym && headSym->cppstr == "fn") - out << endl << string().insert(0, indent + 4, ' '); + if (headSym && (headSym->cppstr == "fn" || headSym->cppstr == "def")) + out << endl << string().insert(0, indent + 2, ' '); } else { out << ast; } -- cgit v1.2.1