From 3968f2ef03290de2bd77ba5f63470fc1e0d133e1 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 28 Jan 2019 10:58:27 +0100 Subject: [PATCH] mpick: add skip expression --- man/mpick.1 | 1 + mpick.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/man/mpick.1 b/man/mpick.1 index 2ad942e..64a63d1 100644 --- a/man/mpick.1 +++ b/man/mpick.1 @@ -105,6 +105,7 @@ tests are given by the following EBNF: | | prune -- do not match further messages in thread | print -- always true value + | skip -- always false value ::= child | draft | flagged | info | new | parent | passed | replied | seen | selected | trashed diff --git a/mpick.c b/mpick.c index 0427519..c4a4207 100644 --- a/mpick.c +++ b/mpick.c @@ -274,6 +274,11 @@ parse_inner() } else if (token("print")) { struct expr *e = mkexpr(EXPR_PRINT); return e; + } else if (token("skip")) { + struct expr *e = mkexpr(EXPR_PRINT); + struct expr *not = mkexpr(EXPR_NOT); + not->a.expr = e; + return not; } else if (token("!")) { struct expr *e = parse_cmp(); struct expr *not = mkexpr(EXPR_NOT);