-
-
Save AlexDaniel/ee235150468db3ee545e7925b398d4c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Grammar.pm b/src/core/Grammar.pm | |
index 514b81d2d..b80ca248c 100644 | |
--- a/src/core/Grammar.pm | |
+++ b/src/core/Grammar.pm | |
@@ -28,9 +28,11 @@ my class Grammar is Match { | |
), | |
$match := ($cursor := $cursor.'!cursor_next'()).MATCH | |
), | |
- $match || $grammar.?SETFAIL($match, :$filename) | |
+ $match || nqp::if(nqp::can($grammar, 'SETFAIL'), | |
+ $grammar.SETFAIL($match, :$filename), Nil) | |
), | |
- $grammar.?SETFAIL($cursor, :$filename) | |
+ nqp::if(nqp::can($grammar, 'SETFAIL'), | |
+ $grammar.SETFAIL($cursor, :$filename), Nil) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment