Skip to content

Commit 456dd5d

Browse files
committed
Add foreach node to ast dumper
1 parent 07e4a04 commit 456dd5d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nmfu.py

+12
Original file line numberDiff line numberDiff line change
@@ -4355,6 +4355,18 @@ def tie_to(sources, cfrm=None, extra_kwargs=None):
43554355

43564356
coming_from = next_coming_from
43574357

4358+
elif isinstance(ast, ForeachNode):
4359+
next_coming_from = debug_dump_ast(ast.child_node, into=c, coming_from=coming_from, make_id=make_id, make_subgraph=make_subgraph)
4360+
4361+
handler_start = make_id()
4362+
if ast.each_actions:
4363+
c.node(make_id(), f"each: " + ",".join(label_of(x) for x in ast.each_actions), style="filled", color="white")
4364+
4365+
if ast.after_actions:
4366+
c.node(make_id(), f"finish: " + ",".join(label_of(x) for x in ast.after_actions), style="filled", color="white")
4367+
4368+
coming_from = next_coming_from
4369+
43584370
else:
43594371
node = make_id()
43604372
c.node(node, "?", color="blue")

0 commit comments

Comments
 (0)