Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created December 6, 2016 14:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zoffixznet/fcceeda5c1d718810bce869e65607aec to your computer and use it in GitHub Desktop.
rule statement_control:sym<unless> {
$<sym>='unless'<.kok>
<xblock(0)> # 0 means we're not parsing `without`
[ <!before [els[e|if]|orwith]» >
|| $<wrong-keyword>=[els[e|if]|orwith]» {}
<.typed_panic: 'X::Syntax::UnlessElse',
keyword => ~$<wrong-keyword>,
>
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment