- while (m/\G(.*?(?:(\w+)\s*=>\s*($re_delim)[\}\)\],;]*)?$re_loc_pair_suffix)/smgo) {
- my ( $all, $key, $val ) = ( $1, $2, $3 );
+ while (m/\G(.*?(?:(\w+|$re_delim)\s*=>\s*($re_delim)[ \{\}\)\],;]*)?$re_loc_pair_suffix)/smgo) {
+ my ( $all, $key, $val ) = ( $1, $2, $10 );
+ $line += ( $all =~ tr/\n/\n/ );
+ $seen{$line}++;
+ unless ( defined $key && defined $val ) {
+ print "\n" unless $errors++;
+ print " Couldn't process loc_pair at $filename:$line:\n $key\n $val\n";
+ next;
+ }
+ my $interp_key = (substr($key,0,1) eq '"' ? 1 : 0);
+ $key =~ s/\\(['"\\])/$1/g if $key =~ s/^(['"])(.*)\1$/$2/g; # dequote potentially quoted string
+ push @{ $FILECAT{$key} }, [ $filename, $line, '', $interp_key ];
+
+ my $interp_val = (substr($val,0,1) eq '"' ? 1 : 0);
+ $val = substr($val, 1, -1); # dequote always quoted string
+ $val =~ s/\\(['"\\])/$1/g;
+ push @{ $FILECAT{$val} }, [ $filename, $line, '', $interp_val ];
+ }
+
+ # Specific key foo => "...", #loc{foo}
+ $line = 1;
+ pos($_) = 0;
+ while (m/\G(.*?(\w+|$re_delim)\s*=>\s*($re_delim)(?-s:.*?)\#$re_space_wo_nl*loc\{\2\}$re_space_wo_nl*)$/smgo) {
+ my ( $all, $key, $val ) = ( $1, $2, $10 );