Skip to content

Commit

Permalink
detect absent (or null) q delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed May 13, 2011
1 parent 905614c commit 6e81878
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions STD.pm6
Expand Up @@ -348,6 +348,12 @@ method peek_delimiters {
elsif $char ~~ /^\w$/ {
self.panic("Alphanumeric character is not allowed as delimiter");
}
elsif $char eq '' {
self.panic("No delimiter found");
}
elsif not ord $char {
self.panic("Null character is not allowed as delimiter");
}
elsif %STD::close2open{$char} {
self.panic("Use of a closing delimiter for an opener is reserved");
}
Expand Down

0 comments on commit 6e81878

Please sign in to comment.