chiark
/
gitweb
/
~ianmdlvl
/
dgit-junk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b392401
)
auditor wip rename $next_x $next_y
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 14:49:42 +0000
(15:49 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 30 Sep 2018 14:49:42 +0000
(15:49 +0100)
i18n-diff-auditor
patch
|
blob
|
history
diff --git
a/i18n-diff-auditor
b/i18n-diff-auditor
index 8c40f4a848822f6d7c7aa23a443ea99dac51b417..53819ca94f445c859f14a5dea54a2847694db5ed 100755
(executable)
--- a/
i18n-diff-auditor
+++ b/
i18n-diff-auditor
@@
-159,17
+159,17
@@
sub analyse_chunk_core () {
$$var = shift @$ary;
};
my ($x,$y);
$$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;
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 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 "'") {
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"; }
$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{^\@}) {
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});
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;
}
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'
if (!$bras and
(grep { $y->{E} eq $_ } qw( or xor and not ; : )
or $y->{T} eq 'ket'