Created
October 29, 2009 18:44
-
-
Save pmichaud/221691 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
$ cat x | |
grammar ABC { | |
regex TOP { | |
abc | |
:my $*XYZ := 4; | |
{ | |
if $*XYZ { | |
say("Darnit, it's about time that we"); | |
say('had closures in regexes.'); | |
say(''); | |
say($*XYZ); | |
} | |
} | |
} | |
} | |
ABC.parse('abc'); | |
$ ./nqp x | |
Darnit, it's about time that we | |
had closures in regexes. | |
4 | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment