Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/100079bd927d239e8ab2 to your computer and use it in GitHub Desktop.
Save FROGGS/100079bd927d239e8ab2 to your computer and use it in GitHub Desktop.
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']);
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