This list is based on discussions with pmichaud and unimplemented items in the grammar, src/Grammar.pg.
src/Grammar.pg
Last updated: 2007-11-24
& sigil
&
Handle the mapping between &foo and 'foo' subroutines.
&foo
return statement
return
While it seems like implementing return would be a simple matter of generating PIR .return statements, it's not quite that simple, because return statements can occur inside of nested blocks.
.return
So, we need an NQP return statement to throw a "return exception", which is then caught by the outermost block of the currently executing subroutine and then used as the argument to .return.
Fortunately, the new design of S05 means that we don't really need return statements for developing action grammars, so this is no longer as much of a priority as it was.
Named argument (not param) support
PAST now supports named arguments in subroutines, we simply need to modify the grammar to parse named arguments in subroutine declarations and build the appropriate actions to fill in the PAST::Var parameter nodes.
PAST
PAST::Var
Optional arguments
Method ops
We should be able to load an external module (Pm suggests Test.pbc) and exercise methods using that.
Hash key access $var<someKey>
$var<someKey>
List member access $var[index]
$var[index]
Match variable access $/
$/
Scalar context $( ... )
List context @( ... )
Variables with twigils
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.