Skip to content
Permalink
Browse files

[sipify] handle scope based enums

  • Loading branch information
3nids committed Mar 7, 2019
1 parent 05756e5 commit e162040f04d91bb1ca6d78d79631f61ba6f13aee
Showing with 3 additions and 2 deletions.
  1. +3 −2 scripts/sipify.pl
@@ -950,8 +950,9 @@ sub detect_non_method_member{
}

# Enum declaration
if ( $LINE =~ m/^\s*enum\s+\w+.*?$/ ){
write_output("ENU1", "$LINE\n");
# For scoped and type based enum, the type has to be removed
if ( $LINE =~ m/^(\s*enum\s+(class\s+)?\w+)(\s*:\s*\w+)?.*$/ ){
write_output("ENU1", "$1\n");
if ($LINE =~ m/\{((\s*\w+)(\s*=\s*[\w\s\d<|]+.*?)?(,?))+\s*\}/){
# one line declaration
$LINE !~ m/=/ or exit_with_error("spify.pl does not handle enum one liners with value assignment. Use multiple lines instead.");

0 comments on commit e162040

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