Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix abstract MOCed class generation
  • Loading branch information
m-kuhn committed Nov 1, 2017
1 parent c3e2adc commit e0c1f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Expand Up @@ -210,7 +210,7 @@ sub remove_following_body_or_initializerlist {
sub fix_annotations {
my $line = $_[0];
# printed annotations
$line =~ s/\b\/\/\s*SIP_ABSTRACT\b/\/Abstract\//;
$line =~ s/\/\/\s*SIP_ABSTRACT\b/\/Abstract\//;
$line =~ s/\bSIP_ABSTRACT\b/\/Abstract\//;
$line =~ s/\bSIP_ALLOWNONE\b/\/AllowNone\//;
$line =~ s/\bSIP_ARRAY\b/\/Array\//g;
Expand Down Expand Up @@ -513,7 +513,7 @@ sub detect_comment_block{

# class declaration started
# https://regex101.com/r/6FWntP/10
if ( $LINE =~ m/^(\s*class)\s+([A-Z]+_EXPORT\s+)?(\w+)(\s*\:\s*(public|protected|private)\s+\w+(< *(\w|::)+ *>)?(::\w+(<\w+>)?)*(,\s*(public|protected|private)\s+\w+(< *(\w|::)+ *>)?(::\w+(<\w+>)?)*)*)?(?<annot>\s*SIP_\w+)?\s*?(\/\/.*|(?!;))$/ ){
if ( $LINE =~ m/^(\s*class)\s+([A-Z]+_EXPORT\s+)?(\w+)(\s*\:\s*(public|protected|private)\s+\w+(< *(\w|::)+ *>)?(::\w+(<\w+>)?)*(,\s*(public|protected|private)\s+\w+(< *(\w|::)+ *>)?(::\w+(<\w+>)?)*)*)?(?<annot>\s*\/?\/?\s*SIP_\w+)?\s*?(\/\/.*|(?!;))$/ ){
dbg_info("class definition started");
push @ACCESS, PUBLIC;
push @EXPORTED, 0;
Expand Down

0 comments on commit e0c1f0b

Please sign in to comment.