Support comma in annotations when merging inline

This commit is contained in:
Alessandro Pasotti 2018-01-31 12:34:34 +01:00
parent 28ff28a223
commit cbd0ece0a6

View File

@ -343,9 +343,9 @@ sub fix_annotations {
$line =~ s/SIP_VIRTUALERRORHANDLER\(\s*(\w+)\s*\)/\/VirtualErrorHandler=$1\//;
# combine multiple annotations
# https://regex101.com/r/uvCt4M/3
# https://regex101.com/r/uvCt4M/4
do {no warnings 'uninitialized';
$line =~ s/\/(\w+(=\w+)?)\/\s*\/(\w+(=\w+)?)\//\/$1,$3\//;
$line =~ s/\/([\w,]+(=\w+)?)\/\s*\/([\w,]+(=\w+)?)\//\/$1,$3\//;
(! $3) or dbg_info("combine multiple annotations -- works only for 2");
};