summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-16 14:46:25 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-16 14:46:25 -0800
commita075a17b531653246b9e25f76aa6efb83f4055a9 (patch)
tree6c6be644ab9416b4d0ac248f7583b7bd429db4e3 /match.c
parentb86a599bbfcd591f64f31ddfc9ab1a659d39a7c0 (diff)
downloadtxr-a075a17b531653246b9e25f76aa6efb83f4055a9.tar.gz
txr-a075a17b531653246b9e25f76aa6efb83f4055a9.tar.bz2
txr-a075a17b531653246b9e25f76aa6efb83f4055a9.zip
Allow directives after variable to be a kind of negative match.
* match.c (search_form): bugfix: return correct match extent. * parser.y: Adjusting associativity and precedence of directives, IDENT, and grouping tokens once again. This is so that a var followed by a directive will turn into one elem, rather than the var being reduced to an elem first. * txr.1: Revised documentation to mroe clearly define the concept of a negative match, broken into subsections. Some sections belonging to syntax were moved to an appropriate location. Subsections added to description of form syntax. Explanation of directive-driven syntax.
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index 3b501e55..3e10b9bb 100644
--- a/match.c
+++ b/match.c
@@ -418,7 +418,7 @@ static val search_form(match_line_ctx *c, val needle_form, val from_end)
match_line(ml_specline_pos(*c, spec, pos)));
if (new_pos) {
c->bindings = new_bindings;
- return cons(pos, new_pos);
+ return cons(pos, minus(new_pos, pos));
}
}