mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-25 17:04:01 +00:00
rethink put-boolean purposing: make it a continuation filter
This commit is contained in:
parent
c4df69b87b
commit
d5800a7df9
2 changed files with 4 additions and 4 deletions
|
|
@ -220,13 +220,11 @@ static sllv_t* mapper_put_process(lrec_t* pinrec, context_t* pctx, void* pvstate
|
|||
// Filter statement
|
||||
mv_t val = pevaluator->pprocess_func(pinrec, pctx, pevaluator->pvstate);
|
||||
if (val.type == MT_NULL) {
|
||||
lrec_free(pinrec);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
mv_set_boolean_strict(&val);
|
||||
if (!(val.u.boolv ^ pstate->filter_exclude)) {
|
||||
lrec_free(pinrec);
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ TOP OF LIST
|
|||
|
||||
* filter-then-put with capture-groups
|
||||
! bracing @ mld:ref:put
|
||||
|
||||
! code/doc put-filter -> expression gate. & restore full filter-doc section at mld.
|
||||
o expanded lrec_context or some such for the regex backcaptures; or (better) within lrec_t itself
|
||||
! pointer integrity for backcaptures followed by unlinks/renames etc. ... strdup them?
|
||||
o name clash for \1 \2 etc.:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue