Sphinx docs coming along.

It's so pretty!  Make me want to write more docs.  :-)

Some weird bug parsing the library.py module though.  D'oh!
This commit is contained in:
Simon Forman
2018-04-22 22:44:49 -07:00
parent 2d617a2588
commit 93b35593d4
9 changed files with 127 additions and 75 deletions
+12 -10
View File
@@ -19,16 +19,6 @@
#
'''
Pretty printing support.
This is what does the formatting, e.g.:
. 23 18 mul 99 add
23 . 18 mul 99 add
23 18 . mul 99 add
414 . 99 add
414 99 . add
513 .
'''
# (Kinda clunky and hacky. This should be swapped out in favor of much
# smarter stuff.)
@@ -38,6 +28,18 @@ from .stack import expression_to_string, stack_to_string
class TracePrinter(object):
'''
This is what does the formatting, e.g.::
Joy? 23 18 * 99 +
. 23 18 mul 99 add
23 . 18 mul 99 add
23 18 . mul 99 add
414 . 99 add
414 99 . add
513 .
'''
def __init__(self):
self.history = []