-
-
Save AlexDaniel/8d1a3739b5fa70fb965d88b57db9dff1 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
use MySlang; | |
<begin>xxx<end1> |
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
role G { | |
token term:sym<end1> { '<begin>' ~ '<end1>' \w+ } | |
token term:sym<end2> { '<begin>' ~ '<end2>' \w+ } | |
} | |
role A { | |
method term:sym<end1>(Mu $/) { say 'end1' } | |
method term:sym<end2>(Mu $/) { say 'end2' } | |
} | |
sub EXPORT { | |
$*LANG.refine_slang: 'MAIN', G, 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
for ^10 { | |
exit 42 unless run <perl6 -Isandbox/ sandbox/main> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment