summaryrefslogtreecommitdiffstats
path: root/tests/010/seq.expected
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-08-05 06:52:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-08-05 06:52:25 -0700
commitb7f76edb07c6395e8ae6f3a336292666ea1c8eda (patch)
tree172ce301714bb02a3ea42565003f1319a64cd1dc /tests/010/seq.expected
parent29b5a31ad6d3783e9bb178f35d21110bea06451e (diff)
downloadtxr-b7f76edb07c6395e8ae6f3a336292666ea1c8eda.tar.gz
txr-b7f76edb07c6395e8ae6f3a336292666ea1c8eda.tar.bz2
txr-b7f76edb07c6395e8ae6f3a336292666ea1c8eda.zip
txr: @(eof) takes argument for binding termination status.
We extend the matching context structures to keep track of the underlying stream from which lines are being taken via the lazy list. Then the implementation of the @(eof) directive, when it hits the eof condition, can use this stream to gain access to the termination status. * match.c (match_line_ctx, match_files_ctx): New member, stream. (ml_all): Take stream argument and initialize new member. (h_call, do_match_line): Pass stream argument to h_call. (mf_all, mf_file_data): Take stream argument and initialize new member. (mf_from_ml): Propagate stream from line context to file context. (freeform_prepare, v_next_impl, match_filter, match_fun, extract): Pass stream argument where now needed. (v_eof): Implement termination status binding via the stream stored in the context. (open_data_source): Store stream in match files context. * tests/010/eof-status.txr: New file. * tests/010/eof-status.expected: New file. * Makefile (tst/tests/010/eof-status.ok): -B option for new test. * txr.1: Documented eof directive, argument and all. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'tests/010/seq.expected')
0 files changed, 0 insertions, 0 deletions