Skip to content
Permalink
Browse files

[sipify] finer detection of enum lines

  • Loading branch information
3nids committed Sep 10, 2018
1 parent 64bb3ef commit 10fc175f2ae4ba8cc817738fca446ac65f5d7ff9
Showing with 4 additions and 4 deletions.
  1. +4 −4 scripts/sipify.pl
@@ -935,11 +935,11 @@ sub detect_non_method_member{
if (detect_comment_block()){
next;
}
if ($LINE =~ m/\};/){
last;
}
last if ($LINE =~ m/\};/);
next if ($LINE =~ m/^\s*\w+\s*\|/); # multi line declaration as sum of enums

do {no warnings 'uninitialized';
my $enum_decl = $LINE =~ s/(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+.*?)?(,?).*$/$1$2$3/r;
my $enum_decl = $LINE =~ s/^(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+)?(,?).*$/$1$2$3/r;
$enum_decl = fix_annotations($enum_decl);
write_output("ENU3", "$enum_decl\n");
};

0 comments on commit 10fc175

Please sign in to comment.
You can’t perform that action at this time.