Skip to content

Commit 10fc175

Browse files
committedSep 10, 2018
[sipify] finer detection of enum lines
1 parent 64bb3ef commit 10fc175

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎scripts/sipify.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,11 @@ sub detect_non_method_member{
935935
if (detect_comment_block()){
936936
next;
937937
}
938-
if ($LINE =~ m/\};/){
939-
last;
940-
}
938+
last if ($LINE =~ m/\};/);
939+
next if ($LINE =~ m/^\s*\w+\s*\|/); # multi line declaration as sum of enums
940+
941941
do {no warnings 'uninitialized';
942-
my $enum_decl = $LINE =~ s/(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+.*?)?(,?).*$/$1$2$3/r;
942+
my $enum_decl = $LINE =~ s/^(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+)?(,?).*$/$1$2$3/r;
943943
$enum_decl = fix_annotations($enum_decl);
944944
write_output("ENU3", "$enum_decl\n");
945945
};

0 commit comments

Comments
 (0)
Please sign in to comment.