diff options
author | David Robillard <d@drobilla.net> | 2010-12-29 00:35:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-29 00:35:28 +0000 |
commit | 42b51cce2575fa138fddf1cfd4581bf1d1568b24 (patch) | |
tree | 03ea8256f19d3418fd4e847391a4b5a84f8b6e0f /src/pprint.cpp | |
parent | 703f1840af79ca4480c664190cdcf7e6fbd7b90e (diff) | |
download | resp-42b51cce2575fa138fddf1cfd4581bf1d1568b24.tar.gz resp-42b51cce2575fa138fddf1cfd4581bf1d1568b24.tar.bz2 resp-42b51cce2575fa138fddf1cfd4581bf1d1568b24.zip |
Literal lists (i.e. list quoting).
Compile type expressions.
Only compile a top-level function if program has code to run (i.e. isn't just definitions).
Cast tuples to Object when necessary to avoid LLVM IR type mismatches (for cons stores and return values).
Fix memory leaks.
git-svn-id: http://svn.drobilla.net/resp/resp@369 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/pprint.cpp')
-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 15e9f54..4e0d036 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -37,8 +37,11 @@ newline(ostream& out, unsigned indent) static inline void print_annotation(ostream& out, CEnv* cenv, const AST* ast, bool print) { - if (print) - out << " :" << cenv->tsubst.apply(cenv->tenv.var(ast)); + if (print) { + const AST* var = cenv->tenv.var(ast); + if (var) + out << " :" << cenv->tsubst.apply(var); + } } ostream& |