-
-
Save smls/1d6cf6af547f7f7cfba5 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
#!/usr/bin/env perl6 | |
grammar Foo { | |
token TOP { <custom(42)> "a" } | |
method custom ($cursor: $n) { | |
# say $cursor.^mro; | |
# say $cursor.^methods>>.name; | |
return $cursor; | |
} | |
} | |
say Foo.parse("a"); |
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
P6opaque: no such attribute '$!pos' | |
in regex TOP at ./01_grammar_custom_method.p6:4 | |
in block <unit> at ./01_grammar_custom_method.p6:14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment