diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-04 19:32:50 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-04 19:32:50 -0800 |
commit | a187efa3e4ad663a7588c9aba32c2ff2d4601e7c (patch) | |
tree | 465ed22d37c85fa6d7bd30eb279456ec7df1fa4f | |
parent | 39289bfcb123c2289216215fc49b10ded9cc24b7 (diff) | |
download | txr-a187efa3e4ad663a7588c9aba32c2ff2d4601e7c.tar.gz txr-a187efa3e4ad663a7588c9aba32c2ff2d4601e7c.tar.bz2 txr-a187efa3e4ad663a7588c9aba32c2ff2d4601e7c.zip |
Harmonize code with previous commit.
* parser.y (expand_repeat_rep_args): Use a sym local
variable to avoid evaluating first(arg) twice,
like the previous commit does in another case of
this function.
-rw-r--r-- | parser.y | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1301,10 +1301,11 @@ static val expand_repeat_rep_args(val args) } ptail = list_collect(ptail, iout); } else if (exp_pair) { - ptail = list_collect(ptail, list(first(arg), + val sym = first(arg); + ptail = list_collect(ptail, list(sym, expand(second(arg), nil), nao)); - match_reg_var(first(arg)); + match_reg_var(sym); } else { ptail = list_collect(ptail, arg); } |