diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-01-05 18:15:42 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-01-05 18:15:42 -0800 |
commit | 9496b3f825b80611b7bbfbc8cd9898da0412f581 (patch) | |
tree | adda4925ac10ae696d30992cd2e824a58d0697c7 | |
parent | ff037a5cf972aee097d30d068588bd77b217d39f (diff) | |
download | txr-9496b3f825b80611b7bbfbc8cd9898da0412f581.tar.gz txr-9496b3f825b80611b7bbfbc8cd9898da0412f581.tar.bz2 txr-9496b3f825b80611b7bbfbc8cd9898da0412f581.zip |
* match.c (h_trailer): Bugfix: not returning new variable
bindings captured in trailer section. Ouch!
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | match.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2015-01-05 Kaz Kylheku <kaz@kylheku.com> + + * match.c (h_trailer): Bugfix: not returning new variable + bindings captured in trailer section. Ouch! + 2015-01-01 Kaz Kylheku <kaz@kylheku.com> Version 101 @@ -1045,7 +1045,7 @@ static val h_parallel(match_line_ctx *c) static val h_trailer(match_line_ctx *c) { val result = match_line(ml_specline(*c, rest(c->specline))); - val new_pos = cdr(result); + cons_bind (new_bindings, new_pos, result); val elem = first(c->specline); if (!new_pos) { @@ -1054,7 +1054,7 @@ static val h_trailer(match_line_ctx *c) } LOG_MATCH("trailer", new_pos); - return cons(c->bindings, plus(c->pos, c->base)); + return cons(new_bindings, plus(c->pos, c->base)); } static val h_fun(match_line_ctx *c) |