diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-09-20 15:13:01 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-09-21 13:35:52 +0200 |
commit | 768d5e1058693d2bfb7c3bcbe04306097c3246a0 (patch) | |
tree | 97b6d1887b7cea60e31f11fd989a605fd931be53 /filter/filter.c | |
parent | 75ac3d199d1fd5b199dd753915234b8634c272e5 (diff) |
Add !~ operator to filter grammar
Diffstat (limited to 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index ccdfed36..2f5f00d8 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -716,6 +716,16 @@ interpret(struct f_inst *what) runtime( "~ applied on unknown type pair" ); res.val.i = !!res.val.i; break; + + case P('!','~'): + TWOARGS; + res.type = T_BOOL; + res.val.i = val_in_range(v1, v2); + if (res.val.i == CMP_ERROR) + runtime( "!~ applied on unknown type pair" ); + res.val.i = !res.val.i; + break; + case P('d','e'): ONEARG; res.type = T_BOOL; |