diff options
Diffstat (limited to 'scripts/whitespace.pl')
-rw-r--r-- | scripts/whitespace.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/whitespace.pl b/scripts/whitespace.pl index ad5380442..fa4718649 100644 --- a/scripts/whitespace.pl +++ b/scripts/whitespace.pl @@ -3,7 +3,10 @@ my $input = $ARGV[0]; my $source = `clang-format $input`; $source =~ s/^(.*each.*\(.*\).*)\n\s*{\s*$/$1 {/img; -$source =~ s/^(\s*struct.*)\n\s*{\s*$/$1 {/img; +$source =~ s/^(\s*struct[^()\n]*)\n\s*{\s*$/$1 {/img; +$source =~ s/^(\s*static\s+struct[^()\n]*)\n\s*{\s*$/$1 {/img; +$source =~ s/^(\s*union[^()\n]*)\n\s*{\s*$/$1 {/img; +$source =~ s/^(\s*static\s+union[^()\n]*)\n\s*{\s*$/$1 {/img; $source =~ s/^(\s*class.*)\n\s*{\s*$/$1 {/img; $source =~ s/^(\S*::\S*.*)\n\s*: /$1 : /img; $source =~ s/(?:\G|^)[ ]{6}/\t/mg; |