diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-10-06 13:12:09 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-10-06 13:12:09 -0400 |
commit | 19528c3cab1020196bd6a033dd47871e087f8886 (patch) | |
tree | bc6dd53bf5e0a8612f9d284fb92606bc513724e1 | |
parent | ff53e4e4778109389192494af3bb5dbfcdeb50f0 (diff) | |
download | bfs-19528c3cab1020196bd6a033dd47871e087f8886.tar.xz |
expr, eval: Clean up header dependencies
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | eval.h | 23 | ||||
-rw-r--r-- | expr.h | 18 |
3 files changed, 23 insertions, 19 deletions
@@ -25,6 +25,7 @@ #include "diag.h" #include "dstring.h" #include "exec.h" +#include "expr.h" #include "fsade.h" #include "mtab.h" #include "printf.h" @@ -22,8 +22,27 @@ #ifndef BFS_EVAL_H #define BFS_EVAL_H -#include "ctx.h" -#include "expr.h" +#include <stdbool.h> + +struct bfs_ctx; +struct expr; + +/** + * Ephemeral state for evaluating an expression. + */ +struct eval_state; + +/** + * Expression evaluation function. + * + * @param expr + * The current expression. + * @param state + * The current evaluation state. + * @return + * The result of the test. + */ +typedef bool eval_fn(const struct expr *expr, struct eval_state *state); /** * Evaluate the command line. @@ -22,6 +22,7 @@ #define BFS_EXPR_H #include "color.h" +#include "eval.h" #include "exec.h" #include "printf.h" #include "stat.h" @@ -37,23 +38,6 @@ struct expr; /** - * Ephemeral state for evaluating an expression. - */ -struct eval_state; - -/** - * Expression evaluation function. - * - * @param expr - * The current expression. - * @param state - * The current evaluation state. - * @return - * The result of the test. - */ -typedef bool eval_fn(const struct expr *expr, struct eval_state *state); - -/** * Possible types of numeric comparison. */ enum cmp_flag { |