Skip to content

Commit

Permalink
Supply a warning for using \K and instead suggest <(
Browse files Browse the repository at this point in the history
or )>
  • Loading branch information
samcv committed Dec 8, 2016
1 parent af8eadd commit 4550f68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/QRegex/P6Regex/Grammar.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
~ ' If you meant the backspace character, quote it ("\b") or use it as'
~ ' inside a character class (<[\b]>)'
>}
token backslash:sym<K> { 'K' <.obs:
'\\K', '<( for discarding text before the capture marker or )> for discarding text after.'
>}
token backslash:sym<A> { 'A' <.obs: '\\A as beginning-of-string matcher', '^'> }
token backslash:sym<z> { 'z' <.obs: '\\z as end-of-string matcher', '$'> }
token backslash:sym<Z> { 'Z' <.obs: '\\Z as end-of-string matcher', '\\n?$'> }
Expand Down

0 comments on commit 4550f68

Please sign in to comment.