eval + basic stdlib

This commit is contained in:
Loic Nageleisen 2014-01-26 18:56:03 +01:00
parent 5bb94d2dda
commit b6560c6484
5 changed files with 115 additions and 17 deletions

View file

@ -40,6 +40,12 @@ class TestParser(TestCase):
self.assertRaises(ValueError, parser.parse("(42"))
class TestAST(TestCase):
def test_lists_in_list(self):
ptree = parser.parse("(+ (* 4 5) (* 3 2))")
repr(ptree.ast())
if __name__ == '__main__':
import unittest
unittest.main()