Skip to content

Commit

Permalink
[sipify] finer detection of enum lines
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 10, 2018
1 parent 64bb3ef commit 10fc175
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/sipify.pl
Expand Up @@ -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");
};
Expand Down

0 comments on commit 10fc175

Please sign in to comment.