perltidy -sal='method fun'
- will cause the perltidy to treate the words 'method' and 'fun' to be
+ will cause the perltidy to treat the words 'method' and 'fun' to be
treated the same as if they were 'sub'.
- Added flag --space-prototype-paren=i, or -spp=i, to control spacing
my $j = 0; # field index
$patterns[0] = "";
+ my %token_count;
for my $i ( $ibeg .. $iend ) {
# Keep track of containers balanced on this line only.
$tok .= $block_type;
}
+ # Mark multiple copies of certain tokens with the copy number
+ # This will allow the aligner to decide if they are matched.
+ # For now, only do this for equals. For example, the two
+ # equals on the next line will be labeled '=0' and '=0.2'.
+ # Later, the '=0.2' will be ignored in alignment because it
+ # has no match.
+
+ # $| = $debug = 1 if $opt_d;
+ # $full_index = 1 if $opt_i;
+
+ if ( $raw_tok eq '=' ) {
+ $token_count{$tok}++;
+ if ( $token_count{$tok} > 1 ) {
+ $tok .= '.' . $token_count{$tok};
+ }
+ }
+
# concatenate the text of the consecutive tokens to form
# the field
push( @fields,
--- /dev/null
+# ignore second '=' here
+$| = $debug = 1 if $opt_d;
+$full_index = 1 if $opt_i;
+$query_all = $opt_A if $opt_A;
+
+# align multiple '='s here
+$start = $end = $len = $ismut = $number = $allele_ori = $allele_mut =
+ $proof = $xxxxreg = $reg = $dist = '';
--- /dev/null
+# ignore second '=' here
+$| = $debug = 1 if $opt_d;
+$full_index = 1 if $opt_i;
+$query_all = $opt_A if $opt_A;
+
+# align multiple '='s here
+$start = $end = $len = $ismut = $number = $allele_ori = $allele_mut =
+ $proof = $xxxxreg = $reg = $dist = '';
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
+../snippets16.t multiple_equals.def
#3 git16.def
#4 git10.def
#5 git10.git10
+#6 multiple_equals.def
# To locate test #13 you can search for its name or the string '#13'
my %Structure = $Self->PackageParse( String => $Package );
----------
+ 'multiple_equals' => <<'----------',
+# ignore second '=' here
+$| = $debug = 1 if $opt_d;
+$full_index = 1 if $opt_i;
+$query_all = $opt_A if $opt_A;
+
+# align multiple '='s here
+$start = $end = $len = $ismut = $number = $allele_ori = $allele_mut =
+ $proof = $xxxxreg = $reg = $dist = '';
+----------
+
'spp' => <<'----------',
sub get_val() { }
} @unsorted;
#5...........
},
+
+ 'multiple_equals.def' => {
+ source => "multiple_equals",
+ params => "def",
+ expect => <<'#6...........',
+# ignore second '=' here
+$| = $debug = 1 if $opt_d;
+$full_index = 1 if $opt_i;
+$query_all = $opt_A if $opt_A;
+
+# align multiple '='s here
+$start = $end = $len = $ismut = $number = $allele_ori = $allele_mut =
+ $proof = $xxxxreg = $reg = $dist = '';
+#6...........
+ },
};
my $ntests = 0 + keys %{$rtests};