-
-
Save FROGGS/100079bd927d239e8ab2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp | |
index 78e1974..e79a1ae 100644 | |
--- a/src/Perl6/Actions.nqp | |
+++ b/src/Perl6/Actions.nqp | |
@@ -5081,6 +5081,12 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
$source | |
)); | |
} | |
+ elsif $target.isa(QAST::Op) && $target.op eq 'call' && $target.name eq '&DYNAMIC' && | |
+ $target[0][1] eq 'Ss' { | |
+ make QAST::Op.new( :op('bind'), | |
+ QAST::VarWithFallback.new( :name($target[0][2].value), :scope('contextual') ), | |
+ $source) | |
+ } | |
# XXX Several more cases to do... | |
else { | |
$*W.throw($/, ['X', 'Bind']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
grammar COBOL::Grammar { | |
token statementlist($bootint) { | |
a | |
} | |
#~ method statementlist($bootint) { | |
#~ say $bootint.HOW.name($bootint); | |
#~ } | |
}; | |
class COBOL::Actions { | |
method statementlist($/) { | |
say 'yay' | |
} | |
} | |
sub EXPORT(*@a) { | |
%*LANG<COBOL> := COBOL::Grammar; | |
%*LANG<COBOL-actions> := COBOL::Actions; | |
$*MAIN := 'COBOL'; | |
$*W.install_lexical_symbol($*W.cur_lexpad(), '%?LANG', $*W.p6ize_recursive(%*LANG)); | |
$*W.install_lexical_symbol($*W.cur_lexpad(), '$*MAIN', $*W.p6ize_recursive($*MAIN)); | |
$*W.p6ize_recursive( nqp::hash() ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment