changeset 660:29df99369746

...
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 18 Aug 2020 08:29:54 +0900
parents 755c2dca04a1
children b6a3e1638f3a
files src/parallel_execution/tools/trans_impl.pl
diffstat 1 files changed, 18 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/tools/trans_impl.pl	Tue Aug 18 08:24:35 2020 +0900
+++ b/src/parallel_execution/tools/trans_impl.pl	Tue Aug 18 08:29:54 2020 +0900
@@ -215,14 +215,14 @@
 }
 
 sub update_file {
-    my ($output_file, $interface, $impl, $impl_file,$context_deeps) = @_;
-    my $under_code = collection_save_code_gears($output_file,$interface->{var_name});
-    open my $fh, '>', $output_file;
-    emit_include_part($fh, $interface->{ir}->{name},$context_deeps);
-    emit_impl_header_in_comment($fh, $impl_file);
-    emit_constracutor($fh,$impl,$interface);
-    map { print $fh $_ } @{$under_code};
-    close $fh;
+  my ($output_file, $interface, $impl, $impl_file,$context_deeps) = @_;
+  my $under_code = collection_save_code_gears($output_file,$interface->{var_name});
+  open my $fh, '>', $output_file;
+  emit_include_part($fh, $interface->{ir}->{name},$context_deeps);
+  emit_impl_header_in_comment($fh, $impl_file);
+  emit_constracutor($fh,$impl,$interface);
+  map { print $fh $_ } @{$under_code};
+  close $fh;
 }
 
 sub collection_save_code_gears {
@@ -241,17 +241,16 @@
 }
 
 #https://metacpan.org/pod/String::CamelCase
-sub decamelize
-{
-        my $s = shift;
-        $s =~ s{([^a-zA-Z]?)([A-Z]*)([A-Z])([a-z]?)}{
-                my $fc = pos($s)==0;
-                my ($p0,$p1,$p2,$p3) = ($1,lc$2,lc$3,$4);
-                my $t = $p0 || $fc ? $p0 : '_';
-                $t .= $p3 ? $p1 ? "${p1}_$p2$p3" : "$p2$p3" : "$p1$p2";
-                $t;
-        }ge;
-        $s;
+sub decamelize {
+  my $s = shift;
+  $s =~ s{([^a-zA-Z]?)([A-Z]*)([A-Z])([a-z]?)}{
+          my $fc = pos($s)==0;
+          my ($p0,$p1,$p2,$p3) = ($1,lc$2,lc$3,$4);
+          my $t = $p0 || $fc ? $p0 : '_';
+          $t .= $p3 ? $p1 ? "${p1}_$p2$p3" : "$p2$p3" : "$p1$p2";
+          $t;
+  }ge;
+  $s;
 }
 
 sub find_using_interface_header {