# it takes no part in anything we do.
my $to_output_simple;
my $non_final_folds;
+ my $all_folds;
sub setup_case_folding($) {
# Read in the case foldings in CaseFolding.txt. This handles both
Fate => $INTERNAL_ONLY,
Description => "Code points that particpate in a multi-char fold and are not the final character of said fold",
);
+ $all_folds = $perl->add_match_table("_Perl_Any_Folds",
+ Perl_Extension => 1,
+ Fate => $INTERNAL_ONLY,
+ Description => "Code points that particpate in some fold",
+ );
# If we ever wanted to show that these tables were combined, a new
# property method could be created, like set_combined_props()
# so that _swash_inversion_hash() is able to construct closures
# without having to worry about F mappings.
if ($type eq 'C' || $type eq 'F' || $type eq 'I' || $type eq 'S') {
+ $all_folds->add_range(hex $range, hex $range); # Assumes range is single
$_ = "$range; Case_Folding; "
. "$CMD_DELIM$REPLACE_CMD=$MULTIPLE_BEFORE$CMD_DELIM$map";
+
if ($type eq 'F') {
my @string = split " ", $map;
for my $i (0 .. @string - 1 -1) {
- $non_final_folds->add_range(hex $string[$i], hex $string[$i]);
+ my $decimal = hex $string[$i];
+ $non_final_folds->add_range($decimal, $decimal);
+ $all_folds->add_range($decimal, $decimal);
}
}
+ else {
+ $all_folds->add_range(hex $map, hex $map);
+ }
}
else {
$_ = "";