mirror of
https://github.com/lloeki/wasp.git
synced 2025-12-06 02:34:39 +01:00
REPL: catch more
This commit is contained in:
parent
32978d0273
commit
457e24fb31
1 changed files with 6 additions and 2 deletions
8
repl.py
8
repl.py
|
|
@ -36,10 +36,14 @@ if __name__ == "__main__":
|
|||
try:
|
||||
ptree = wasp.parser.parse(line)
|
||||
except ValueError, e:
|
||||
print e.message
|
||||
print "Parse error:", e.message
|
||||
continue
|
||||
|
||||
print " ^ %s" % ptree
|
||||
ast = ptree.ast()
|
||||
try:
|
||||
ast = ptree.ast()
|
||||
except ValueError, e:
|
||||
print "AST error:", e.message
|
||||
continue
|
||||
print " ‡ %r" % ast
|
||||
#ast.eval()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue