Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support for nqp::const.
  • Loading branch information
jnthn committed Feb 17, 2013
1 parent d2795bb commit 10dac76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -3823,6 +3823,10 @@ class Perl6::Actions is HLL::Actions does STDActions {
make $past;
}

method term:sym<nqp::const>($/) {
make QAST::Op.new( :op('const'), :name(~$<const>) );
}

method term:sym<*>($/) {
my $whatever := $*W.find_symbol(['Whatever']);
make QAST::Op.new(
Expand Down
4 changes: 4 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -2484,6 +2484,10 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
'nqp::' $<op>=[\w+] <args>?
}

token term:sym<nqp::const> {
'nqp::const::' $<const>=[\w+]
}

token term:sym<name> {
<longname>
:my $*longname;
Expand Down

0 comments on commit 10dac76

Please sign in to comment.