summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-08 10:14:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-08 10:14:57 -0700
commit6926c639bd4df81a5144b1c87cf274163f0293c2 (patch)
tree2be36d8f9d6d2b84b7a278a6f2bec9a2a7c17fb7 /match.c
parentd910f624a23e374004924f46541e6f99b48583c7 (diff)
downloadtxr-6926c639bd4df81a5144b1c87cf274163f0293c2.tar.gz
txr-6926c639bd4df81a5144b1c87cf274163f0293c2.tar.bz2
txr-6926c639bd4df81a5144b1c87cf274163f0293c2.zip
* match.c (match_line): Skip directive bugfix. If skip is the
last item on the line, it must match the whole line by returning success.
Diffstat (limited to 'match.c')
-rw-r--r--match.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/match.c b/match.c
index 580527e4..839d9e06 100644
--- a/match.c
+++ b/match.c
@@ -495,8 +495,10 @@ static val match_line(val bindings, val specline, val dataline,
val greedy = eq(max, greedy_k);
val last_good_result = nil, last_good_pos = nil;
- if (!rest(specline))
- break;
+ if (!rest(specline)) {
+ debuglf(lit("skip to end of line ~a:~a"), file, data_lineno);
+ return cons(bindings, t);
+ }
{
cnum reps_max = 0, reps_min = 0;