diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-28 00:39:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-28 00:39:43 -0800 |
commit | fbf48de67c4ba652b22fe379cb27f7f3b01f314b (patch) | |
tree | d09403d649207d44dbb84db09ad481cf6b8d50b4 /parser.y | |
parent | 0fcfb0282230bdee1f9e5decdba14aa75d8de3e8 (diff) | |
download | txr-fbf48de67c4ba652b22fe379cb27f7f3b01f314b.tar.gz txr-fbf48de67c4ba652b22fe379cb27f7f3b01f314b.tar.bz2 txr-fbf48de67c4ba652b22fe379cb27f7f3b01f314b.zip |
* eval.c (meta_meta_p, meta_meta_strip): New static functions.
(transform_op): Recognize compounded metas, and strip one level off.
(eval_init): Intern sys:expand function so we have access to the
form expander from TXR Lisp.
* lib.c (obj_print, obj_pprint): Fix: wasn't rendering metanumbers.
* parser.y (list): Support @ in front of anything. If it's an atom,
treat it similarly to a metasymbol or metanumber.
* txr.1: Documented meta-meta arguments in nested op.
* genvim.txr, txr.vim: Support coloring for compounded meta syntax.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -699,7 +699,10 @@ list : '(' n_exprs ')' { $$ = rl($2, num($1)); } | '(' ')' { $$ = nil; } | '[' n_exprs ']' { $$ = rl(cons(dwim_s, $2), num($1)); } | '[' ']' { $$ = rl(cons(dwim_s, nil), num($1)); } - | '@' list { $$ = rlcp(cons(expr_s, $2), $2); } + | '@' n_expr { if (consp($2)) + $$ = rlcp(cons(expr_s, $2), $2); + else + $$ = rlcp(cons(var_s, cons($2, nil)), $2); } | '(' error { $$ = nil; yybadtoken(yychar, lit("list expression")); } | '[' error { $$ = nil; |