Skip to content

Commit

Permalink
Fix MARKER/MARKED to work with QRegex.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 7, 2012
1 parent 9b81195 commit 0815cde
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/QHLL/Grammar.pm
Expand Up @@ -798,10 +798,13 @@ An operator precedence parser.
have_markhash:
};
%markhash{$markname} := $pos;
1;
my $cur := self."!cursor_start"();
$cur."!cursor_pass"($pos);
$cur;
}

method MARKED($markname) {
my $cur := self."!cursor_start"();
Q:PIR {
.local pmc self, markname, markhash
self = find_lex 'self'
Expand All @@ -812,10 +815,11 @@ An operator precedence parser.
if null $P0 goto fail
$P1 = self.'pos'()
unless $P0 == $P1 goto fail
.return (1)
$P2 = find_lex '$cur'
$P2."!cursor_pass"($P1)
fail:
.return (0)
};
$cur
}

method LANG($lang, $regex) {
Expand Down

0 comments on commit 0815cde

Please sign in to comment.