From: Steve Hancock Date: Mon, 6 Jan 2020 14:44:39 +0000 (-0800) Subject: updated error stop criterion for iterations X-Git-Tag: 20200110~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9810c62339b1d0286ee25fa2bdc02a5e03ae3559;p=perltidy.git updated error stop criterion for iterations --- diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 3ecfcb15..a107d08b 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -1178,6 +1178,7 @@ EOM # stop iterations if errors or converged my $stop_now = $tokenizer->report_tokenization_errors(); + $stop_now ||= $tokenizer->get_unexpected_error_count(); if ($stop_now) { $convergence_log_message = <{_unexpected_error_count}; +} + # interface to Perl::Tidy::Diagnostics routines sub write_diagnostics { my $msg = shift;