diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-21 22:32:18 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-21 22:32:18 -0800 |
commit | 54c3c4929abf062717f36712cd20dc4873c8d04c (patch) | |
tree | 651da4d587c3039492024c707f85b7c2f1442598 /parser.l | |
parent | 7349b5de069f831d23119f6fc0124a0b8daa4401 (diff) | |
download | txr-54c3c4929abf062717f36712cd20dc4873c8d04c.tar.gz txr-54c3c4929abf062717f36712cd20dc4873c8d04c.tar.bz2 txr-54c3c4929abf062717f36712cd20dc4873c8d04c.zip |
txr: pattern function calls are non-matching.
This patch causes TXR to treat calls to verticatl functions,
as well as the @(call) directive to be considered non-matching
directives, so that opening the data source is deferred.
This allows included .txr files to call the funtions that they
define, without the side effect of standard input being read.
* match.c (open_data_source): Function refactored to reduce
duplication. c->data is checked first, and if it is not t,
nothing is done, making the function cheaper in the frequent
case. The non_matching_dir condition changes. We now check
that the first element of the first spec is a non-nil symbol.
If it has a function binding as a vertical function, then
that is considered non_matching.
(dir_tables_init): Treat @(call) as a non-matching directive.
* Makefile (tst/tests/008/no-stdin-hang.ok): Add -n argument
for non-interactive, which will cause stdin to be read in
that test case if there is a regression in this change. If
make tests is run in a terminal, this will hang make tests.
* tests/no-stdin-hang.txr: New file.
* tests/no-stdin-hang.expected: New file.
Diffstat (limited to 'parser.l')
0 files changed, 0 insertions, 0 deletions