diff options
author | David Robillard <d@drobilla.net> | 2010-12-09 23:43:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-09 23:43:17 +0000 |
commit | 46af3ed1f9c552928ef61b4e609157768bcf4807 (patch) | |
tree | ae36f21059a1ab9eb7d5a4e583770bdf75461823 | |
parent | 9ca23b0ba970e58d2207cb85ab6093c9ddaa4e2a (diff) | |
download | resp-46af3ed1f9c552928ef61b4e609157768bcf4807.tar.gz resp-46af3ed1f9c552928ef61b4e609157768bcf4807.tar.bz2 resp-46af3ed1f9c552928ef61b4e609157768bcf4807.zip |
Sort code.
git-svn-id: http://svn.drobilla.net/resp/resp@341 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | src/pprint.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index 5d03c78..80f854c 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -136,6 +136,12 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool 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) const ATuple* pat = (*i++)->as_tuple(); @@ -149,17 +155,6 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) } else if (form == "if") { print_list(out, tup, i, indent + 4, cenv, types, true); - } else if (form == "match") { - out << (*i++); - newline(out, indent + 2); - print_list(out, tup, i, indent + 2, cenv, types, true); - - } 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 == "let") { out << "("; const ATuple* vars = (*i)->as_tuple(); @@ -181,6 +176,11 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) if (types) out << " :" << cenv->tsubst.apply(cenv->tenv.var(tup->list_last())); + } else if (form == "match") { + out << (*i++); + newline(out, indent + 2); + print_list(out, tup, i, indent + 2, cenv, types, true); + } else { print_list_one_line(out, tup, i, indent + 1, cenv, types, false); } |