diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-08-15 16:51:45 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-08-15 16:52:34 -0400 |
commit | 9749af08293d16f3d5faedea371fdd3699f2adf2 (patch) | |
tree | 3ea0cfdad551b976aca81a5ea2344a116c8f778e /src/opt.c | |
parent | 50dd5af226853d8d7201c7478d13f773cfd1479e (diff) | |
download | bfs-9749af08293d16f3d5faedea371fdd3699f2adf2.tar.xz |
expr: Tell expressions what kind of expression they are
Diffstat (limited to 'src/opt.c')
-rw-r--r-- | src/opt.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1337,7 +1337,7 @@ static struct bfs_expr *opt_const(struct bfs_opt *opt, bool value) { static bfs_eval_fn *const fns[] = {eval_false, eval_true}; static char *fake_args[] = {"-false", "-true"}; - struct bfs_expr *expr = bfs_expr_new(opt->ctx, fns[value], 1, &fake_args[value]); + struct bfs_expr *expr = bfs_expr_new(opt->ctx, fns[value], 1, &fake_args[value], BFS_TEST); return visit_shallow(opt, expr, &annotate); } @@ -1351,7 +1351,7 @@ static struct bfs_expr *negate_expr(struct bfs_opt *opt, struct bfs_expr *expr, return opt_const(opt, true); } - struct bfs_expr *ret = bfs_expr_new(opt->ctx, eval_not, 1, argv); + struct bfs_expr *ret = bfs_expr_new(opt->ctx, eval_not, 1, argv, BFS_OPERATOR); if (!ret) { return NULL; } |