Fixed #10967: Using a round bracket (parenthesis) in a macro. Unbalanced parentheses can now be escaped in macro calls using the backslash character.

This commit is contained in:
hao 2009-09-14 14:27:14 -04:00
parent f40992f217
commit a48b16dbfc
5 changed files with 55 additions and 2 deletions

View file

@ -46,7 +46,9 @@ my $parenthesis;
$parenthesis = qr{
\( # Start with '(',
(?: # Followed by
(?>[^()]+) # Non-parenthesis
(?>\\[()]) # Escaped parenthesis
| # or
(?>[^()]) # Non-parenthesis
| # or
(??{ $parenthesis }) # a balanced parenthesis block
)* # zero or more times