diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-02-23 10:43:49 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-02-23 10:43:49 -0500 |
commit | 2e026d9acbad5ce4b689bc95079cec7192cbf367 (patch) | |
tree | cb5eba0b93702c9fdb05081d301296a384ce84d7 /bfs.h | |
parent | 55e2963668d7f2b4150e29c9b57652e3478eab75 (diff) | |
download | bfs-2e026d9acbad5ce4b689bc95079cec7192cbf367.tar.xz |
Implement -D tree.
Diffstat (limited to 'bfs.h')
-rw-r--r-- | bfs.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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; }; /** |