Skip to content

Commit

Permalink
Remove "uniscript"
Browse files Browse the repository at this point in the history
Clearly this was *way* too naive.  See GH#2003
  • Loading branch information
lizmat committed Jul 4, 2018
1 parent 5ec2c96 commit e4e753b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/core/Cool.pm6
Expand Up @@ -117,7 +117,6 @@ my class Cool { # declared in BOOTSTRAP
method uniprop-str(|c) { uniprop-str(self, |c) }
method uniprops(|c) { uniprops(self, |c) }
method unimatch(|c) { unimatch(self, |c) }
method uniscript(|c) { uniscript(self) }

method chomp(Cool:D:) { self.Str.chomp }

Expand Down Expand Up @@ -396,7 +395,6 @@ multi sub uniprop-bool(|) { die 'uniprop-bool NYI on jvm backend' }
multi sub uniprop-str(|) { die 'uniprop-str NYI on jvm backend' }
multi sub uniprops(|) { die 'uniprops NYI on jvm backend' }
multi sub unimatch(|) { die 'unimatch NYI on jvm backend' }
multi sub uniscript(|) { die 'uniscript NYI on jvm backend' }
#?endif

#?if moar
Expand Down Expand Up @@ -557,28 +555,6 @@ multi sub unimatch(Int:D $code, Stringy:D $pvalname, Stringy:D $propname = $pval
my $prop := nqp::unipropcode($propname);
nqp::p6bool(nqp::matchuniprop($code,$prop,nqp::unipvalcode($prop,$pvalname)));
}

proto sub uniscript($) {*}
multi sub uniscript(Str:D $str) {
if $str {
my $seen;
for $str.comb -> $char {
if uniprop($char,"Script") -> $script {
unless $script eq 'Common' {
return Nil if $seen && $script ne $seen;
$seen = $script;
}
}
else {
die "Could not find script for '$char' ({$char.ord})";
}
}
$seen // 'Common'
}
else {
''
}
}
#?endif

# vim: ft=perl6 expandtab sw=4

0 comments on commit e4e753b

Please sign in to comment.