convert_swig mishandles struct templates #468

The new regular expression added a pair of parentheses without the "?:"
substring to ignore the match.  I added the "?:"
This commit is contained in:
Alex Lin 2017-08-21 14:07:31 -05:00
parent 70a81acc6c
commit 86007c70cd

View File

@ -90,7 +90,7 @@ my $class_def = qr/(?:class|struct)\s* # keyword class or st
/sx ;
my $template_def = qr/template\s* # keyword template
<[^>]+>\s* # template parameters
(class|struct) # keyword class or struct
(?:class|struct) # keyword class or struct
\s+[_A-Za-z]\w*\s* # class name
/sx ;
my $template_var_def = qr/(?:\:\:)?[_A-Za-z][:\w]*\s* # template name