delete MAkefile target links on realclean
[nedit-bw.git] / indexNotInArray.diff
blobd4cb7c985098491444db871a0a53e36a9c6bc954
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 file 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 @@ -524,10 +524,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();