aboutsummaryrefslogtreecommitdiffstats
path: root/src/pprint.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-12-29Literal lists (i.e. list quoting).David Robillard1-2/+5
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
2010-12-28Print type annotations for top-level expressions when -a is given.David Robillard1-9/+14
git-svn-id: http://svn.drobilla.net/resp/resp@364 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Remove weird __tag_is form by adding a T_LITSYM type and using = operator.David Robillard1-0/+1
Step towards having first class symbols... git-svn-id: http://svn.drobilla.net/resp/resp@362 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Kill AType.David Robillard1-9/+2
git-svn-id: http://svn.drobilla.net/resp/resp@359 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove AType::DOTS.David Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/resp/resp@358 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove AType::PRIM.David Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/resp/resp@357 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Update headers.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/resp/resp@352 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-25Print missing trailing `)'.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@347 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Sort code.David Robillard1-11/+11
git-svn-id: http://svn.drobilla.net/resp/resp@341 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Strip trailing whitespace.David Robillard1-5/+5
git-svn-id: http://svn.drobilla.net/resp/resp@336 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Print newlines after def symbol if type annotation is printed.David Robillard1-2/+5
git-svn-id: http://svn.drobilla.net/resp/resp@334 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Print def form more tersely (no newline after symbol).David Robillard1-5/+4
git-svn-id: http://svn.drobilla.net/resp/resp@333 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Decent pretty printing for all forms.David Robillard1-60/+71
git-svn-id: http://svn.drobilla.net/resp/resp@331 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Fix cpplint warnings.David Robillard1-0/+2
git-svn-id: http://svn.drobilla.net/resp/resp@329 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Add let form.David Robillard1-1/+26
git-svn-id: http://svn.drobilla.net/resp/resp@328 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Make environment always referenced by symbols.David Robillard1-2/+2
Intern symbol strings, but not ASymbol objects themselves, so each symbol can have a different Cursor. Fixes missing locations in error reporting. git-svn-id: http://svn.drobilla.net/resp/resp@324 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-08Print type annotations correctly.David Robillard1-3/+10
Print newlines between definitions. git-svn-id: http://svn.drobilla.net/resp/resp@312 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-07Saner recursive descent lexer/parser.David Robillard1-6/+0
git-svn-id: http://svn.drobilla.net/resp/resp@306 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-07Pretty print booleans correctly.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@305 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Remove use of RTTI for AST.David Robillard1-33/+27
git-svn-id: http://svn.drobilla.net/resp/resp@290 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Make AString, ALexeme, and ASymbol all contain (rather than inherit from) ↵David Robillard1-3/+3
std::string. git-svn-id: http://svn.drobilla.net/resp/resp@288 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Represent code as list structure (i.e. traditional LISP lists built from ↵David Robillard1-47/+57
pairs), rather than tuple structure. Remove unused/crufty depoly stage. Remove cps from AST interface (but keep cps.cpp code around for later). Improved command line interface for compilation stages (options -T -L -S). git-svn-id: http://svn.drobilla.net/resp/resp@277 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-01Add -T option to type-check and pretty-print with type annotations.David Robillard1-105/+93
Rename -p to -P (all 'stage' options, i.e. -P -T -S are uppercase for consistency). Clean up main program. Decent pretty printing. git-svn-id: http://svn.drobilla.net/resp/resp@275 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-09-30Preliminary work on algebraic data types and run-time typing.David Robillard1-4/+5
git-svn-id: http://svn.drobilla.net/resp/resp@270 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-09-15Better pretty printer.David Robillard1-20/+87
git-svn-id: http://svn.drobilla.net/resp/resp@269 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-08-19Coherent AString and Lexeme implementation.David Robillard1-1/+5
A Lexeme is any "token" read from input, a lexeme has not yet beeen parsed and could parse to anything, e.g. a string, an expression, a number, etc. Lexemes are not (yet?) exposed to the language or ever compiled. A String is a string literal, which can contain any character directly except " and \. There are two special escapes: \" and \\, any other character following a \ is a syntax error. Fix garbage collection of REPL objects, leading to type errors from type variable re-use because a type variable for a given AST's /address/ exists, but that address has actually been deleted and reused by new (i.e. make top level REPL expressions and types be GC roots). git-svn-id: http://svn.drobilla.net/resp/resp@261 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-04-13Slightly less terrible "pretty" printing.David Robillard1-5/+5
git-svn-id: http://svn.drobilla.net/resp/resp@255 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-04-08Tuplr -> Resp (RESource Processing).David Robillard1-5/+5
git-svn-id: http://svn.drobilla.net/resp/resp@252 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-10-17Print ellipses correctly.David Robillard1-0/+1
git-svn-id: http://svn.drobilla.net/resp/tuplr@245 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-10-15Remove some use of ATuple::size().David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/tuplr@230 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-10-15Remove all use of ATuple::at().David Robillard1-6/+11
git-svn-id: http://svn.drobilla.net/resp/tuplr@229 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-10-15Replace more use of at(0) with head().David Robillard1-4/+4
git-svn-id: http://svn.drobilla.net/resp/tuplr@228 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-07-04Ditch Exp type and use AST even at lex time.David Robillard1-0/+4
git-svn-id: http://svn.drobilla.net/resp/tuplr@182 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-07-03Improved const correctness.David Robillard1-1/+1
Use iterators over indices (towards non-vector ATuple). git-svn-id: http://svn.drobilla.net/resp/tuplr@176 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-06-29More documentation fixes.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/tuplr@167 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-06-29Build compiler documentation.David Robillard1-0/+4
git-svn-id: http://svn.drobilla.net/resp/tuplr@163 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2009-06-28write.cpp -> pprint.cpp.David Robillard1-0/+97
git-svn-id: http://svn.drobilla.net/resp/tuplr@162 ad02d1e2-f140-0410-9f75-f8b11f17cedd