Created
          February 20, 2016 22:38 
        
      - 
      
- 
        Save skids/7f3e8613857a9f6ca9da to your computer and use it in GitHub Desktop. 
    inverted "when" statement
  
        
  
    
      This file contains hidden or 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 nqp; | |
| use QAST:from<NQP>; | |
| sub EXPORT(|) { | |
| role Control::Never { | |
| rule statement_control:sym<never> { | |
| <sym><.kok> <xblock> | |
| } | |
| } | |
| role Control::Never::Actions { | |
| method statement_control:sym<never>(|c) { | |
| $/ := c[0]; | |
| my $when = self.'statement_control:sym<when>'($/); | |
| $when.op('unless'); | |
| } | |
| } | |
| nqp::bindkey(%*LANG, 'MAIN', %*LANG<MAIN>.HOW.mixin(%*LANG<MAIN>, Control::Never)); | |
| nqp::bindkey(%*LANG, 'MAIN-actions', %*LANG<MAIN-actions>.HOW.mixin(%*LANG<MAIN-actions>, Control::Never::Actions)); | |
| {} | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment