diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-01-21 21:13:33 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-01-21 21:13:33 -0800 |
commit | b64bcbb6e7bd7f331f660518e97e2bfa898ae340 (patch) | |
tree | 8b80eb794c7f4777346947fccea8b0faafeb4185 /parser.h | |
parent | 9cac065f8374ed008bf8274909b3f431dd9e8da6 (diff) | |
download | txr-b64bcbb6e7bd7f331f660518e97e2bfa898ae340.tar.gz txr-b64bcbb6e7bd7f331f660518e97e2bfa898ae340.tar.bz2 txr-b64bcbb6e7bd7f331f660518e97e2bfa898ae340.zip |
bugfix: expand macros in a number of directives.
This is the last round of changes on this topic, bringing
proper macro expansion to the arguments to @(skip),
@(fuzz), @(next), @(call), @(cat), @(load) and @(close).
* match.c (match_expand_keyword_args): Only process the
keyword arguments if they are followed by an argument.
Process @(next) arguments here too: :list and :string
take a Lisp expression, but :tlist and :var take an
argument which is not a Lisp expression and must be
handled properly. Also, expand any non-keyword expression.
This handles the <source> argument of @(next).
(match_expand_elem): New function.
* match.h (match_expand_elem): Declared.
* parser.h (expand_meta): Declared.
* parser.y (expand_meta): Static function becomes external.
(elem): Expand elem other than require or do using
match_expand_elem. We don't fold require and do into this
because match_expand_elem has a backward compat switch
in it that doesn't apply to these.
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -102,6 +102,7 @@ int parse_once(val stream, val name, parser_t *parser); int parse(parser_t *parser, val name, enum prime_parser); val source_loc(val form); val source_loc_str(val form, val alt); +val expand_meta(val form, val menv); val rlset(val form, val info); void parser_reset(parser_t *); INLINE val rlcp(val to, val from) |