} ## end sub class_ok_here
sub scan_id {
+ my $self = shift;
( $i, $tok, $type, $id_scan_state ) =
- scan_id_do( $input_line, $i, $tok, $rtokens, $rtoken_map,
+ $self->scan_id_do( $input_line, $i, $tok, $rtokens, $rtoken_map,
$id_scan_state, $max_token_index );
return;
} ## end sub scan_id
sub do_ATTRIBUTE_LIST {
- my ($next_nonblank_token) = @_;
+ my ( $self, $next_nonblank_token ) = @_;
# Called at a bareword encountered while in an attribute list
# returns 'is_attribute':
# start just after the word 'prototype'
my $i_beg = $i + 1;
- ( $i, $tok, $type, $id_scan_state ) = do_scan_sub(
+ ( $i, $tok, $type, $id_scan_state ) = $self->do_scan_sub(
{
input_line => $input_line,
i => $i,
}
if ($in_attribute_list) {
- my $is_attribute = do_ATTRIBUTE_LIST($next_nonblank_token);
+ my $is_attribute = $self->do_ATTRIBUTE_LIST($next_nonblank_token);
return if ($is_attribute);
}
}
else {
initialize_subname();
- scan_id();
+ $self->scan_id();
}
}
else {
error_if_expecting_OPERATOR()
if ( $expecting == OPERATOR );
initialize_subname();
- scan_id();
+ $self->scan_id();
}
}
{
do_UNKNOWN_BAREWORD($next_nonblank_token);
}
- else { scan_id() }
+ else { $self->scan_id() }
}
else {
error_if_expecting_OPERATOR()
if ( $expecting == OPERATOR );
- scan_id();
+ $self->scan_id();
}
}
if ($id_scan_state) {
if ( $is_sub{$id_scan_state} || $is_package{$id_scan_state} ) {
- scan_id();
+ $self->scan_id();
}
else {
scan_identifier();
# USES GLOBAL VARIABLES: $current_package, $last_nonblank_token, $in_attribute_list,
# $statement_type, $tokenizer_self
- my ( $input_line, $i, $tok, $rtokens, $rtoken_map, $id_scan_state,
+ my ( $self, $input_line, $i, $tok, $rtokens, $rtoken_map, $id_scan_state,
$max_token_index )
= @_;
use constant DEBUG_NSCAN => 0;
unless ($blank_line) {
if ( $is_sub{$id_scan_state} ) {
- ( $i, $tok, $type, $id_scan_state ) = do_scan_sub(
+ ( $i, $tok, $type, $id_scan_state ) = $self->do_scan_sub(
{
input_line => $input_line,
i => $i,
# $in_attribute_list, %saw_function_definition,
# $statement_type
- my ($rinput_hash) = @_;
+ my ( $self, $rinput_hash ) = @_;
my $input_line = $rinput_hash->{input_line};
my $i = $rinput_hash->{i};
# This may end badly, it is safest to block formatting
# For an example, see perl527/lexsub.t (issue c203)
- $tokenizer_self->[_in_trouble_] = 1;
+ $self->[_in_trouble_] = 1;
}
}
else {
}
}
$saw_function_definition{$subname}{$package} =
- $tokenizer_self->[_last_line_number_];
+ $self->[_last_line_number_];
}
}
elsif ( $next_nonblank_token eq ';' ) {