diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-09-28 11:18:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-09-28 11:18:48 -0700 |
commit | e24b844825e726b0f050faaf28d00798c29e342f (patch) | |
tree | 3901d6cfc5d3db59c6e653482dc0bc391deef079 | |
parent | 88a0ca81d753a6393b06fdabb984aeff48dcaa3b (diff) | |
download | txr-e24b844825e726b0f050faaf28d00798c29e342f.tar.gz txr-e24b844825e726b0f050faaf28d00798c29e342f.tar.bz2 txr-e24b844825e726b0f050faaf28d00798c29e342f.zip |
* match.c (match_line): Bugfix in double var. Do not
prepend the next_pat to the specline if it is nil.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | match.c | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2011-09-28 Kaz Kylheku <kaz@kylheku.com> + * match.c (match_line): Bugfix in double var. Do not + prepend the next_pat to the specline if it is nil. + +2011-09-28 Kaz Kylheku <kaz@kylheku.com> + * match.c (match_line): Logic restructured to allow for regex variables which also have nested variables. Previously this code was assuming that the cases were @@ -433,8 +433,10 @@ static val match_line(val bindings, val specline, val dataline, pos = fpos; LOG_MATCH("double var regex (second var)", plus(fpos, flen)); pos = plus(fpos, flen); - specline = cons(next_pat, rest(specline)); - continue; + if (next_pat) { + specline = cons(next_pat, rest(specline)); + continue; + } } else if (!pair) { sem_error(spec_lineno, lit("consecutive unbound variables"), nao); } else { |