diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-24 04:26:35 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-24 04:26:35 -0800 |
commit | 9a178bcb364eeb8a9aa334f4de65d30722596cdb (patch) | |
tree | 580352b545115342e20a44c0af16897c3242b604 /match.h | |
parent | c4b87400ed9fb160ba5b282f1b58c62c057cbd50 (diff) | |
download | txr-9a178bcb364eeb8a9aa334f4de65d30722596cdb.tar.gz txr-9a178bcb364eeb8a9aa334f4de65d30722596cdb.tar.bz2 txr-9a178bcb364eeb8a9aa334f4de65d30722596cdb.zip |
First cut at @(load) directive. Incomplete: debug location info
needs to record file name, not only line number; absolute paths
not handled, etc.
* match.c (load_s): New symbol variable.
(v_load): New static function.
(syms_init): load_s initialized.
(dir_tables_init): Load directive registered.
* match.h (load_s): Declared.
* parser.h (parse_reset): New function declared.
* parser.l (spec_file_str): Global variable moved from txr.c.
(parse_reset): New function.
* parser.y (clause): Special handling for @(load ...) directive.
parent file path inserted into the syntax at parse time,
so when the load directive executes, it can load the file from
the same directory as the parent file.
* txr.c (spec_file_str): Global variable moved to parser.l.
Diffstat (limited to 'match.h')
-rw-r--r-- | match.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -24,7 +24,8 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -extern val text_s, choose_s, gather_s, do_s, mod_s, modlast_s, counter_k; +extern val text_s, choose_s, gather_s, do_s; +extern val load_s, mod_s, modlast_s, counter_k; val format_field(val string_or_list, val modifier, val filter, val eval_fun); val match_filter(val name, val arg, val other_args); val match_fun(val name, val args, val input, val files); |