summaryrefslogtreecommitdiff
path: root/tests/test_ports.py
Commit message (Collapse)AuthorAge
* Big-ass coding binge presents: a Lisp.Owen Jacobson2017-11-13
| | | | This implements a continuation-passing interpreter, which means we get tail calls ferfree. I stopped short of implementing call/cc, because I don't think we need it, but we can get there if we have to.
* Introduce input ports.Owen Jacobson2017-11-11
Ports are the lisp abstraction of files and streams. Actinide ports additionally guarantee a peek operation. This makes ``tokenize`` (now ``read_token``) callable as a lisp function, as it takes a port and reads one token from it. This is a substantial refactoring. As most of the state is now captured by closures, it's no longer practical to test individual states as readily. However, the top-level tokenizer tests exercise the full state space.