basic ast

This commit is contained in:
Loic Nageleisen 2014-01-24 23:11:18 +01:00
parent 5819dba46a
commit daa57a1f47
3 changed files with 81 additions and 2 deletions

View file

@ -2,7 +2,9 @@ import wasp.parser as parser
line = raw_input(">> ")
while line != "":
tree = parser.parse(line)
print "^^", tree
ptree = parser.parse(line)
print " ^ %s" % ptree
ast = ptree.ast()
print "%r" % ast
#tree.eval()
line = raw_input(">> ")