summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-01 14:15:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-01 14:15:04 -0800
commitdf3337250fdff73a0d6076d4ada1719aaecdaafd (patch)
tree0de3819b927aff20f83a06a06540c4ed386f771b /parser.y
parentda46f6b1d25d2e0a44fb73905dcc8bdc5c35f54a (diff)
downloadtxr-df3337250fdff73a0d6076d4ada1719aaecdaafd.tar.gz
txr-df3337250fdff73a0d6076d4ada1719aaecdaafd.tar.bz2
txr-df3337250fdff73a0d6076d4ada1719aaecdaafd.zip
* eval.c (lookup_sym_lisp1): New function.
(do_eval, do_eval_args): New static functions. (eval, eval_args): Become wrappers for do_eval and do_eval_args, respectively. (eval_lisp1, eval_args_lisp1): New static functions. (dwim_loc, op_dwim): Use eval_lisp1 and eval_args_lisp1 instead of eval and eval_args. * parser.y (meta_expr): Bugfix: expand the whole dwim expression, rather than its arguments, which are not an expression. * txr.1: Updated with notes that dwim really does Lisp-1 style evaluation.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.y b/parser.y
index a3d28df1..0946fc8d 100644
--- a/parser.y
+++ b/parser.y
@@ -677,8 +677,8 @@ list : '(' exprs ')' { $$ = rl($2, num($1)); }
meta_expr : METAPAR exprs ')' { $$ = rlcp(cons(expr_s, expand($2)), $2); }
| METABKT exprs ']' { $$ = rlcp(cons(expr_s,
- cons(dwim_s,
- expand($2))), $2); }
+ expand(cons(dwim_s, $2))),
+ $2); }
| METAPAR ')' { $$ = rl(cons(expr_s, nil), num(lineno)); }
| METABKT ']' { $$ = rl(cons(expr_s, cons(dwim_s, nil)),
num(lineno)); }