Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Add traits to method definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Sep 9, 2010
1 parent 7188f73 commit f3dabb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NQP/Actions.pm
Expand Up @@ -482,7 +482,11 @@ method method_def($/) {
$past.name($name);
}
if $*MULTINESS eq 'multi' { $past.multi().unshift('_'); }
$past<block_past> := $past;
make $past;
if $<trait> {
for $<trait> { $_.ast()($/); }
}
}


Expand Down
1 change: 1 addition & 0 deletions src/NQP/Grammar.pm
Expand Up @@ -307,6 +307,7 @@ rule method_def {
<.newpad>
[ '(' <signature> ')'
|| <.panic: 'Routine declaration requires a signature'> ]
<trait>*
<blockoid>
}

Expand Down

0 comments on commit f3dabb7

Please sign in to comment.