Skip to content

Commit 0815cde

Browse files
committed
Fix MARKER/MARKED to work with QRegex.
1 parent 9b81195 commit 0815cde

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/QHLL/Grammar.pm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,10 +798,13 @@ An operator precedence parser.
798798
have_markhash:
799799
};
800800
%markhash{$markname} := $pos;
801-
1;
801+
my $cur := self."!cursor_start"();
802+
$cur."!cursor_pass"($pos);
803+
$cur;
802804
}
803805

804806
method MARKED($markname) {
807+
my $cur := self."!cursor_start"();
805808
Q:PIR {
806809
.local pmc self, markname, markhash
807810
self = find_lex 'self'
@@ -812,10 +815,11 @@ An operator precedence parser.
812815
if null $P0 goto fail
813816
$P1 = self.'pos'()
814817
unless $P0 == $P1 goto fail
815-
.return (1)
818+
$P2 = find_lex '$cur'
819+
$P2."!cursor_pass"($P1)
816820
fail:
817-
.return (0)
818821
};
822+
$cur
819823
}
820824

821825
method LANG($lang, $regex) {

0 commit comments

Comments
 (0)