mirror of
https://github.com/lloeki/wasp.git
synced 2025-12-06 10:44:39 +01:00
basic ast
This commit is contained in:
parent
5819dba46a
commit
daa57a1f47
3 changed files with 81 additions and 2 deletions
6
repl.py
6
repl.py
|
|
@ -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(">> ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue