my @ci_string = (); # string needed to compute continuation indentation
my $container_environment = EMPTY_STRING;
my $im = -1; # previous $i value
- my $num;
# Count the number of '1's in the string (previously sub ones_count)
my $ci_string_sum = ( my $str = $ci_string_in_tokenizer ) =~ tr/1/0/;
# note: older versions of perl require the /gc
# modifier here or else the \G does not work.
- if ( $block_type_i =~ /\G('|::|\w)/gc ) {
- $in_statement_continuation = 0;
- }
+ $in_statement_continuation = 0
+ if ( $block_type_i =~ /\G('|::|\w)/gc );
}
# ...and include all block types except user subs
# update continuation flag ...
- ## if ( $type_i ne 'b' && $type_i ne '#' ) { # moved above
-
# if we are in a BLOCK
if ($nesting_block_flag) {
}
} ## end else [ if ($nesting_block_flag)]
- ##} ## end if ( $type_i ne 'b' ... # (old moved above)
-
} ## end else [ if ( $type_i eq '{' ||...})]
if ( $level_in_tokenizer < 0 ) {
# Form and store the previous token
if ( $im >= 0 ) {
- $num =
+ my $numc =
$rtoken_map->[$i] - $rtoken_map->[$im]; # how many characters
- if ( $num > 0 ) {
+ if ( $numc > 0 ) {
push( @tokens,
- substr( $input_line, $rtoken_map->[$im], $num ) );
+ substr( $input_line, $rtoken_map->[$im], $numc ) );
}
}
} ## end foreach my $i ( @{$routput_token_list...})
# Form and store the final token
- $num = length($input_line) - $rtoken_map->[$im]; # make the last token
- if ( $num > 0 ) {
- push( @tokens, substr( $input_line, $rtoken_map->[$im], $num ) );
+ my $numc = length($input_line) - $rtoken_map->[$im];
+ if ( $numc > 0 ) {
+ push( @tokens, substr( $input_line, $rtoken_map->[$im], $numc ) );
}
$line_of_tokens->{_rtoken_type} = \@token_type;