diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-01 00:20:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-01 00:20:39 -0700 |
commit | 3cbf8a388719f2e279c1903642ae7304d27a013f (patch) | |
tree | f6e63813a1d50d8c2e2b0f3fa93cd58584c8935c /cppawk-include/iter.h | |
parent | a7029badeda2a898a3a1e7fade1246fd454ba66e (diff) | |
download | cppawk-3cbf8a388719f2e279c1903642ae7304d27a013f.tar.gz cppawk-3cbf8a388719f2e279c1903642ae7304d27a013f.tar.bz2 cppawk-3cbf8a388719f2e279c1903642ae7304d27a013f.zip |
loop: new if combinator.
Diffstat (limited to 'cppawk-include/iter.h')
-rw-r--r-- | cppawk-include/iter.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cppawk-include/iter.h b/cppawk-include/iter.h index 9e48c7e..72f8acb 100644 --- a/cppawk-include/iter.h +++ b/cppawk-include/iter.h @@ -256,4 +256,10 @@ function __loop_argmin(a, arga, b, argb) #define __step_lockstep(...) prog(__varexpand3(__step_first, __step_next, \ __VA_ARGS__)) +#define __init_if(test, clause) __init_ ## clause +#define __test_if(test, clause) !(test) || __test_ ## clause +#define __prep_if(test, clause) (test) && __prep_ ## clause +#define __fini_if(test, clause) __fini_ ## clause +#define __step_if(test, clause) (test) && __step_ ## clause + #endif |