$continuation_string_in_tokenizer .=
( $in_statement_continuation > 0 ) ? '1' : '0';
- # Sometimes we want to give an opening brace continuation indentation,
- # and sometimes not. For code blocks, we don't do it, so that the leading
- # '{' gets outdented, like this:
- #
- # if ( !$output_block_type[$i]
- # && ($in_statement_continuation) )
- # { <--outdented
- #
- # For other types, we will give them continuation indentation. For example,
- # here is how a list looks with the opening paren indented:
- #
- # @LoL =
- # ( [ "fred", "barney" ], [ "george", "jane", "elroy" ],
- # [ "homer", "marge", "bart" ], );
- #
- # This looks best when 'ci' is one-half of the indentation (i.e., 2 and 4)
+ # Sometimes we want to give an opening brace
+ # continuation indentation, and sometimes not. For code
+ # blocks, we don't do it, so that the leading '{' gets
+ # outdented, like this:
+ #
+ # if ( !$output_block_type[$i]
+ # && ($in_statement_continuation) )
+ # { <--outdented
+ #
+ # For other types, we will give them continuation
+ # indentation. For example, here is how a list looks
+ # with the opening paren indented:
+ #
+ # @LoL =
+ # ( [ "fred", "barney" ], [ "george", "jane", "elroy" ],
+ # [ "homer", "marge", "bart" ], );
+ #
+ # This looks best when 'ci' is one-half of the
+ # indentation (i.e., 2 and 4)
my $total_ci = $ci_string_sum;
if (
}
}
- # be sure binary operators get continuation indentation
+ # Be sure binary operators get continuation indentation.
+ # Note: the check on $nesting_block_flag is only needed
+ # to add ci to binary operators following a 'try' block,
+ # or similar extended syntax block operator (see c158).
if (
( $nesting_block_flag || $nesting_list_flag )
&& ( $type_i eq 'k' && $is_binary_keyword{$tok_i}
../snippets26.t git106.def
../snippets26.t git106.git106
../snippets26.t c154.def
+../snippets26.t code_skipping.code_skipping
../snippets3.t ce_wn1.ce_wn
../snippets3.t ce_wn1.def
../snippets3.t colin.colin
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets26.t code_skipping.code_skipping
+../snippets26.t c158.def
#13 git106.git106
#14 c154.def
#15 code_skipping.code_skipping
+#16 c158.def
# To locate test #13 you can search for its name or the string '#13'
...;
}
}}}}
+----------
+
+ 'c158' => <<'----------',
+my $meta = try { $package->meta }
+or die "$package does not have a ->meta method\n";
+
+my ($curr) = current();
+err(@_);
----------
'code_skipping' => <<'----------',
my $cloning = shift;
#15...........
},
+
+ 'c158.def' => {
+ source => "c158",
+ params => "def",
+ expect => <<'#16...........',
+my $meta = try { $package->meta }
+ or die "$package does not have a ->meta method\n";
+
+my ($curr) = current();
+err(@_);
+#16...........
+ },
};
my $ntests = 0 + keys %{$rtests};