summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-12-28 14:35:44 -0500
committerOri Bernstein <ori@eigenstate.org>2013-12-28 14:35:44 -0500
commit58550115b787023de68c7f760e8dd68c7d57c719 (patch)
treee2c0b125b28551625679e8e7cc0cca65234e3824 /parse/dump.c
parent778de2674cd8f3b2951e367482ef6e56f7382424 (diff)
downloadmc-58550115b787023de68c7f760e8dd68c7d57c719.tar.gz
Add parsing support for iter loops
'for expr in loop' syntax is now parsed, although we don't actually generate code for it.
Diffstat (limited to 'parse/dump.c')
-rw-r--r--parse/dump.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse/dump.c b/parse/dump.c
index 8d58b51..a386d72 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -161,6 +161,12 @@ static void outnode(Node *n, FILE *fd, int depth)
outnode(n->loopstmt.step, fd, depth+1);
outnode(n->loopstmt.body, fd, depth+1);
break;
+ case Niterstmt:
+ fprintf(fd, "\n");
+ outnode(n->iterstmt.elt, fd, depth+1);
+ outnode(n->iterstmt.seq, fd, depth+1);
+ outnode(n->iterstmt.body, fd, depth+1);
+ break;
case Nmatchstmt:
fprintf(fd, "\n");
outnode(n->matchstmt.val, fd, depth+1);