Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove debug output, masak++.
  • Loading branch information
peschwa committed Apr 15, 2015
1 parent 221dfef commit 6830781
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/core/Str.pm
Expand Up @@ -1110,13 +1110,11 @@ my class Str does Stringy { # declared in BOOTSTRAP

method add_substitution($key, $value) {
$/ := CALLERS::('$/');
say "add_subst" ~ $/ if %*ENV<DEBUG_PLS>;
push @!substitutions, $key => $value;
}

submethod compare_substitution($substitution, Int $pos, Int $length) {
$/ := CALLERS::('$/');
say "comp subst" ~ $/ if %*ENV<DEBUG_PLS>;
if $!next_match > $pos
|| $!next_match == $pos && $!substitution_length < $length {

Expand All @@ -1130,7 +1128,6 @@ my class Str does Stringy { # declared in BOOTSTRAP
proto method triage_substitution(|) {*}
multi method triage_substitution($_ where { nqp::istype(.key,Regex) }) {
$/ := CALLERS::('$/');
say "1st triage subst" ~ $/ if %*ENV<DEBUG_PLS>;
my $m := $!source.match(.key, :continue($!index));
return unless $m;
$!last_match_obj = $/;
Expand All @@ -1140,7 +1137,6 @@ my class Str does Stringy { # declared in BOOTSTRAP

multi method triage_substitution($_ where { nqp::istype(.key,Cool) }) {
$/ := CALLERS::('$/');
say "2nd triage subst" ~ $/ if %*ENV<DEBUG_PLS>;
my $pos := index($!source, .key, $!index);
return unless defined $pos;
self.compare_substitution($_, $pos, .key.chars);
Expand All @@ -1154,26 +1150,22 @@ my class Str does Stringy { # declared in BOOTSTRAP
proto method increment_index(|) {*}
multi method increment_index(Regex $s) {
$/ := CALLERS::('$/');
say "1st inc index" ~ $/ if %*ENV<DEBUG_PLS>;
substr($!source,$!index) ~~ $s;
$!last_match_obj = $/;
$!index = $!next_match + $/.chars;
}

multi method increment_index(Cool $s) {
$/ := CALLERS::('$/');
say "2nd inc index" ~ $/ if %*ENV<DEBUG_PLS>;
$!index = $!next_match + nqp::chars($s.Str);
}

method get_next_substitution_result {
my $result = $!complement ?? $!first_substitution.value !! $!next_substitution.value;
my $cds := CALLERS::('$/');
$/ := CALLERS::('$/');
say "get next subst" ~ ~$/ if %*ENV<DEBUG_PLS>;
$cds = $!match_obj;
my $orig-result = $result = ($result ~~ Callable ?? $result() !! $result).Str;
say "result: " ~ $result if %*ENV<DEBUG_PLS>;
if $!prev_result
&& $!prev_result eq $result
&& $!unsubstituted_text eq ''
Expand All @@ -1186,7 +1178,6 @@ my class Str does Stringy { # declared in BOOTSTRAP

method next_substitution() {
$/ := CALLERS::('$/');
say "next subst" ~ ~$/ if %*ENV<DEBUG_PLS>;
$!next_match = $!source.chars;
$!first_substitution //= @!substitutions[0];

Expand Down Expand Up @@ -1227,7 +1218,6 @@ my class Str does Stringy { # declared in BOOTSTRAP
my $from = what.key;
my $to = what.value;
$/ := CALLERS::('$/');
say "1st trans cand" ~ $/ if %*ENV<DEBUG_PLS>;
return self.trans(|%n, (what,))
if !nqp::istype($from,Str) # from not a string
|| !$from.defined # or a type object
Expand Down Expand Up @@ -1327,7 +1317,6 @@ my class Str does Stringy { # declared in BOOTSTRAP
}

$/ := CALLERS::('$/');
say "2nd trans cand" ~ $/ if %*ENV<DEBUG_PLS>;
my $lsm = LSM.new(:source(self), :squash($s), :complement($c));
for (@changes) -> $p {
X::Str::Trans::InvalidArg.new(got => $p).throw
Expand Down

0 comments on commit 6830781

Please sign in to comment.