Skip to content

Instantly share code, notes, and snippets.

@TimToady
Created March 8, 2017 08:16
Show Gist options
  • Save TimToady/df87901b812e4ac0d44e5b5240bcf77d to your computer and use it in GitHub Desktop.
Save TimToady/df87901b812e4ac0d44e5b5240bcf77d to your computer and use it in GitHub Desktop.
my $grammar := $*LANG.grammar();
$grammar := $grammar.HOW.mixin($grammar, Control::Bail);
my $actions := $*LANG.actions();
$actions := $actions.HOW.mixin($actions, Control::Bail::Actions);
try nqp::bindkey(%*LANG, 'MAIN', $grammar);
try nqp::bindkey(%*LANG, 'MAIN-actions', $actions);
try $*LANG.define_slang('MAIN', $grammar, $actions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment