fix hex regex in SH
[nedit-bw.git] / indexNotInArray.diff
blob8c795ca34044f4880f6017f0185f1c4152e39b84
1 [INACTIVE] Allow easy negative testing of array index inclusion
3 This patch provides the composite operator "! in" (for "not in"), which
4 can be used in array tests. This allows the current negative test
5 if (!(index in theArray)) ...
6 to be written
7 if (index !in theArray) ...
9 The Enhancements to NEdit macro parsing patch includes this small change.
11 ---
13 source/parse.y | 4 ++++
14 1 files changed, 4 insertions(+)
16 diff --quilt old/source/parse.y new/source/parse.y
17 --- old/source/parse.y
18 +++ new/source/parse.y
19 @@ -501,10 +501,14 @@ numexpr: NUMBER {
20 ADD_OP(OP_DECR); ADD_OP(OP_ASSIGN); ADD_SYM($1);
22 | numexpr IN numexpr {
23 ADD_OP(OP_IN_ARRAY);
25 + | numexpr NOT IN numexpr {
26 + ADD_OP(OP_IN_ARRAY);
27 + ADD_OP(OP_NOT);
28 + }
30 while: WHILE {
31 $$ = GetPC(); StartLoopAddrList();