Skip to content

Commit

Permalink
[dotnet] Get JnthnNQP to parse :D, :U and :_ and pass it down to the …
Browse files Browse the repository at this point in the history
…PAST compiler.
  • Loading branch information
jnthn committed Oct 31, 2010
1 parent e42de56 commit 842f693
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dotnet/compiler/Actions.pm
Expand Up @@ -687,6 +687,11 @@ method parameter($/) {
$past.multitype($<typename>[0].ast);
}

# Set definedness flag (XXX perhaps want a better way to do this).
if $<definedness> {
$past<definedness> := ~$<definedness>[0];
}

make $past;
}

Expand Down
2 changes: 1 addition & 1 deletion dotnet/compiler/Grammar.pm
Expand Up @@ -371,7 +371,7 @@ token multi_declarator:sym<null> {
token signature { [ [<.ws><parameter><.ws>] ** ',' ]? }

token parameter {
[ <typename> <.ws> ]* # <type_constraint>
[ <typename> [ ':' $<definedness>=<[_DU]> ]? <.ws> ]* # <type_constraint>
[
| $<quant>=['*'] <param_var>
| [ <param_var> | <named_param> ] $<quant>=['?'|'!'|<?>]
Expand Down

0 comments on commit 842f693

Please sign in to comment.