-
-
Save lucasbuchala/7d51f0f809c0d8b3397d48fc74f76338 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; | |
{}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment