| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Pugs
Revision: 22185
Author: pmurias
Date: 07 Sep 2008 16:17:03
Changes:[smop]
unbroke m0ld
changed the example s1p code to take an iterpreter and a scope
| ... | ...@@ -1,17 +1,17 @@ | |
| 1 | 1 | # this is a sample compilation of a Perl 6 class. The example code is in src-s1p/P6Meta.pm |
| 2 | 2 | |
| 3 | my $interpreter; | |
| 4 | my $scope; | |
| 5 | ||
| 6 | # we get a get a lexical scope that should be used as the | |
| 7 | # outer scope of each method, and the interpreter object | |
| 3 | 8 | |
| 4 | 9 | # first it needs to create the p6opaque, register in the namespace and |
| 5 | 10 | # set the how to SMOP__S1P__PurePrototypeHow |
| 6 | 11 | |
| 7 | # we also create a common lexical scope, that should be used as the | |
| 8 | # outer scope of each method | |
| 9 | 12 | |
| 10 | 13 | # then it needs to create the mold for the code. it should include the |
| 11 | 14 | # use of the capture present in $_, as we're going to create every |
| 12 | 15 | # method with the bindcapture signature and then going to implement |
| 13 | 16 | # the lexical scope population in the beggining of the block. |
| 14 | 17 | |
| 15 | ||
| 16 | ||
| 17 |
| ... | ...@@ -18,7 +18,6 @@ | |
| 18 | 18 | data Mold = Mold [Stmt] |
| 19 | 19 | deriving Show |
| 20 | 20 | |
| 21 | type Parser = GenParser Char | |
| 22 | 21 | |
| 23 | 22 | identifier = do |
| 24 | 23 | first <- choice [alphaNum, char '_'] |