Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Panic on unspace in a regex
  • Loading branch information
Mouq committed Sep 28, 2013
1 parent 8bcdb14 commit 1bd3f09
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/QRegex/P6Regex/Grammar.nqp
Expand Up @@ -255,6 +255,7 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
token backslash:sym<Z> { 'Z' <.obs: '\\Z as end-of-string matcher', '\\n?$'> }
token backslash:sym<Q> { 'Q' <.obs: '\\Q as quotemeta', 'quotes or literal variable match'> }
token backslash:sym<unrec> { {} (\w) { self.throw_unrecog_backslash_seq: $/[0].Str } }
token backslash:sym<unsp> { [\s|'#'] <.panic: 'Unspace not allowed in regex'> }
token backslash:sym<misc> { \W }

proto token assertion { <...> }
Expand Down

0 comments on commit 1bd3f09

Please sign in to comment.