Commit Graph

5 Commits

Author SHA1 Message Date
4386965cd9 lang: update bluelib api usage 2025-11-06 10:38:32 +00:00
80e001cdc1 lang: add user args to ast iterator; combine pre/post-order traversal modes
the caller can now provide a pointer arg to ivy_ast_node_iterate, which will
be forwarded to the specified callback function each time it is called.

the iterator now behaves similarly to fts, in that it visits each node
in both pre-order and post-order, and indicates to the callback whether
the current iteration is pre- or post-order.
2025-04-14 12:24:42 +01:00
fd91bb71c0 ast: implement postorder ast traversal 2025-04-14 09:46:27 +01:00
19506a299c lang: ast: add nullptr check to ivy_ast_node_iterate 2024-11-25 16:50:12 +00:00
1e7e73db21 lang: ast: implement ast iteration
iteration is implementing without recursion, instead using type-specific callbacks to construct a queue of nodes to iterate through. ast priting is implemented using this functionality.
2024-11-24 20:50:12 +00:00