chiark / gitweb /
auditor wip rename $next_x $next_y
[dgit-junk.git] / i18n-diff-auditor
index 8c40f4a848822f6d7c7aa23a443ea99dac51b417..53819ca94f445c859f14a5dea54a2847694db5ed 100755 (executable)
@@ -159,17 +159,17 @@ sub analyse_chunk_core () {
        $$var = shift @$ary;
     };
     my ($x,$y);
-    my $next_before = sub { $next_something->(\@xs, \$x, 'before'); };
-    my $next_after  = sub { $next_something->(\@ys , \$y, 'after' ); };
+    my $next_x = sub { $next_something->(\@xs, \$x, 'before'); };
+    my $next_y = sub { $next_something->(\@ys, \$y, 'after' ); };
     my $is_string = sub { $_[0]{T} =~ m/heredoc|string/; };
     for (;;) {
        last unless @xs or @ys;
-       $next_before->();
-       $next_after->();
+       $next_x->();
+       $next_y->();
        next if $x->{E} eq $y->{E};
        my $string_changed;
        if ($y->{E} eq '__' or $y->{E} eq '_f') {
-           $next_after->();
+           $next_y->();
            die "__ on non-string $y->{P}\n"     unless Sis_string->($y);
            die "__ on was non-string $y->{P}\n" unless $is_string->($x);
            if ($y->{Q} ne "'") {
@@ -210,10 +210,10 @@ sub analyse_chunk_core () {
                $fmt = $';
                if ($& eq '%%') { $exactly->('%'); next; }
                elsif ($& ne '%s') { die "unhandled %-subst $&\n"; }
-               $next_after->();
+               $next_y->();
                die "expected comma, got $y->{P}\n" unless $y->{E} eq ',';
                if ($xs =~ m{^\@}) {
-                   $next_after->();
+                   $next_y->();
                    die "\@... => not string" unless $is_string->($y);
                    die "\@... => $y->{P}" if $y->{Q} ne '"';
                    $exactly->($y->{V});
@@ -224,7 +224,7 @@ sub analyse_chunk_core () {
                    if (!$bras and !@ys) {
                        last;
                    }
-                   $next_after->();
+                   $next_y->();
                    if (!$bras and
                        (grep { $y->{E} eq $_ } qw( or xor and not ; : )
                         or $y->{T} eq 'ket'