summaryrefslogtreecommitdiffstats
path: root/bfs.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-02-23 10:43:49 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-02-23 10:43:49 -0500
commit2e026d9acbad5ce4b689bc95079cec7192cbf367 (patch)
treecb5eba0b93702c9fdb05081d301296a384ce84d7 /bfs.h
parent55e2963668d7f2b4150e29c9b57652e3478eab75 (diff)
downloadbfs-2e026d9acbad5ce4b689bc95079cec7192cbf367.tar.xz
Implement -D tree.
Diffstat (limited to 'bfs.h')
-rw-r--r--bfs.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/bfs.h b/bfs.h
index a80ff17..0f8e397 100644
--- a/bfs.h
+++ b/bfs.h
@@ -54,6 +54,8 @@ typedef bool eval_fn(const struct expr *expr, struct eval_state *state);
enum debugflags {
/** Trace all stat() calls. */
DEBUG_STAT = 1 << 0,
+ /** Print the parse tree. */
+ DEBUG_TREE = 1 << 1,
};
/**
@@ -130,6 +132,14 @@ struct expr {
/** The right hand side of the expression. */
struct expr *rhs;
+ /** Whether this expression has no side effects. */
+ bool pure;
+
+ /** The command line arguments resulting in this expression. */
+ char **args;
+ /** The number of command line arguments. */
+ size_t nargs;
+
/** The optional comparison flag. */
enum cmpflag cmp;
@@ -150,9 +160,6 @@ struct expr {
/** Optional string data for this expression. */
const char *sdata;
-
- /** Whether this expression has no side effects. */
- bool pure;
};
/**