summaryrefslogtreecommitdiffstats
path: root/src/expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.h')
-rw-r--r--src/expr.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/expr.h b/src/expr.h
index 75cb5fd..60b298d 100644
--- a/src/expr.h
+++ b/src/expr.h
@@ -8,8 +8,8 @@
#ifndef BFS_EXPR_H
#define BFS_EXPR_H
+#include "prelude.h"
#include "color.h"
-#include "config.h"
#include "eval.h"
#include "stat.h"
#include <sys/types.h>
@@ -244,4 +244,10 @@ bool bfs_expr_cmp(const struct bfs_expr *expr, long long n);
*/
void bfs_expr_clear(struct bfs_expr *expr);
+/**
+ * Iterate over the children of an expression.
+ */
+#define for_expr(child, expr) \
+ for (struct bfs_expr *child = bfs_expr_children(expr); child; child = child->next)
+
#endif // BFS_EXPR_H