summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-12-27 15:51:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-12-27 15:51:53 -0800
commit36fdbc7a4791ffdedf0658eb69963cffe08aaee1 (patch)
tree8b0ee66a9941acd4647d87c2dedaa4b5e51ac940 /parser.c
parent2b4dff1bc2c3274201cdda958037b9065ca974bf (diff)
downloadtxr-36fdbc7a4791ffdedf0658eb69963cffe08aaee1.tar.gz
txr-36fdbc7a4791ffdedf0658eb69963cffe08aaee1.tar.bz2
txr-36fdbc7a4791ffdedf0658eb69963cffe08aaee1.zip
rperm: support general sequences.
* combi.c (rperm_init): Take one more parameter. Allocate the state vector to three elements and put the extra value there. (rperm_list, rperm_vec, rperm_str): Pass nil for the extra value to rperm_init; these do not use it. (rperm_seq_gen_fun, rperm_seq): New functions. These use the extra value to store the original seq in the state, so that the elements of the output sequence can be converted to the same type of sequence as the input. (rperm): Replace error throw in default case with call to rperm_seq.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions