summaryrefslogtreecommitdiffstats
path: root/stdlib/doc-syms.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-17 06:39:43 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-17 06:39:43 -0800
commit4c3316acecc462283c0c853369af93776c478d44 (patch)
treea7e7eeb12c51f02f1c9349ae842e133ea71a87e4 /stdlib/doc-syms.tl
parentc2b8e32e5bea1dbf8d9905f8e9fb80bf91b2ecb2 (diff)
downloadtxr-4c3316acecc462283c0c853369af93776c478d44.tar.gz
txr-4c3316acecc462283c0c853369af93776c478d44.tar.bz2
txr-4c3316acecc462283c0c853369af93776c478d44.zip
keyparams: fix broken.
Issues reported by user vapnik spaknik. The evaluation of init forms is incorrect. Init forms like '(x) evaluate to '(x) rather than (x), Also, init forms are evaluated even when the argument is present, so the entire current approach is wrong. * stdlib/keyparams.tl (extract-keys, extract-keys-p, build-key-list-expr): Functions removed. (stuff-key-params): New function. (:key): Rework using simplified approach, with just the stuff-key-params helper. All variables from the keyword parameter list are bound with let. Generated code searches the keyword parameters for values and assigns the variables as needed, evaluating default init forms in the not-found cases. * tests/011/keyparams.tl: New file.
Diffstat (limited to 'stdlib/doc-syms.tl')
0 files changed, 0 insertions, 0 deletions