summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-16 06:25:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-16 06:25:54 -0700
commitab00af8cc82fc392811b9da08b7646ffd33f67cd (patch)
treec5df63abeef87be94f4984a575404abe52902fc0 /regex.h
parent088cc06dcf434b700da425b2f18b2a9a0ea46889 (diff)
downloadtxr-ab00af8cc82fc392811b9da08b7646ffd33f67cd.tar.gz
txr-ab00af8cc82fc392811b9da08b7646ffd33f67cd.tar.bz2
txr-ab00af8cc82fc392811b9da08b7646ffd33f67cd.zip
quasilit: split format_field into two functions.
The objective of this work is to isolate the field-formatting logic so we can target it in the compiler. Currently, the sys:quasi special operator relies on calling subst_vars, which calls format_field. Both subst_vars and format_field perform dynamic evaluation, requiring an environment. In the compiler, this will be replaced by macro-generated logic; but we would like to obtain the use of the lower-level field formatting as a pure function. * eval.c (do_format_field): New static function. Does the field formatting previously done in format_field. Also performs the indexing on the object implied by the numeric or range modifier; but the range or index is already computed and comes in as a parameter. (format_field): Perform the modifier parsing only, requiring the dynamic evaluations via eval_fun, and then call do_format_field on the extracted data. The range indexing on the input sequence is no longer done during the parsing of the modifiers. That unfortunately changes some behaviors that are possible but are fortunately obscure and undocumented.
Diffstat (limited to 'regex.h')
0 files changed, 0 insertions, 0 deletions