Skip to content

Commit 0b22858

Browse files
committed
Basic FAILGOAL implementation so we at least get a bit better error.
1 parent 5a3575c commit 0b22858

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/QRegex/Cursor.nqp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ role NQPCursorRole {
323323
$cur;
324324
}
325325

326+
method FAILGOAL($goal) {
327+
my $sub := Q:PIR {
328+
%r = getinterp
329+
%r = %r['sub';1]
330+
};
331+
pir::die("Unable to parse " ~ ~$sub ~ ", couldn't find final $goal");
332+
}
326333
}
327334

328335

0 commit comments

Comments
 (0)