mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Missing two tables & some clarrifications (Real author is Richard Cattermole, name changed while rebasing)
This commit is contained in:
parent
fce7d2f6e8
commit
e53a0aba9f
3 changed files with 44 additions and 18 deletions
File diff suppressed because one or more lines are too long
|
@ -6974,8 +6974,8 @@ private static bool isRegionalIndicator(dchar ch) @safe pure @nogc nothrow
|
||||||
|
|
||||||
template genericDecodeGrapheme(bool getValue)
|
template genericDecodeGrapheme(bool getValue)
|
||||||
{
|
{
|
||||||
alias extend = graphemeExtendTrie;
|
alias graphemeExtend = graphemeExtendTrie;
|
||||||
alias spacingMark = mcTrie;
|
alias spacingMark = spacingMarkTrie;
|
||||||
alias prepend = prependTrie;
|
alias prepend = prependTrie;
|
||||||
alias ccTrie = graphemeControlTrie;
|
alias ccTrie = graphemeControlTrie;
|
||||||
alias xpicto = xpictoTrie;
|
alias xpicto = xpictoTrie;
|
||||||
|
@ -10642,10 +10642,10 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
//grapheme breaking algorithm tables
|
//grapheme breaking algorithm tables
|
||||||
auto mcTrie()
|
auto spacingMarkTrie()
|
||||||
{
|
{
|
||||||
import std.internal.unicode_grapheme : SpacingMarkTrieEntries;
|
import std.internal.unicode_grapheme : spacingMarkTrieEntries;
|
||||||
static immutable res = asTrie(SpacingMarkTrieEntries);
|
static immutable res = asTrie(spacingMarkTrieEntries);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -920,12 +920,26 @@ void writeNormalizationTries(File sink)
|
||||||
|
|
||||||
void writeGraphemeTries(File sink)
|
void writeGraphemeTries(File sink)
|
||||||
{
|
{
|
||||||
auto table = graphemeBreaks.table;
|
//few specifics for grapheme cluster breaking algorithm
|
||||||
|
//
|
||||||
|
auto props = general.table;
|
||||||
|
writeBest3Level(sink, "hangulLV", hangul.table["LV"]);
|
||||||
|
writeBest3Level(sink, "hangulLVT", hangul.table["LVT"]);
|
||||||
|
|
||||||
foreach(key; table.byKey)
|
// Grapheme specific information
|
||||||
{
|
writeBest3Level(sink, "prepend", graphemeBreaks.table["Prepend"]);
|
||||||
writeBest3Level(sink, key, table[key]);
|
writeBest3Level(sink, "control", graphemeBreaks.table["Control"]);
|
||||||
}
|
|
||||||
|
// We use Grapheme_Cluster_Break=SpacingMark instead of GC=Mc,
|
||||||
|
// Grapheme_Cluster_Break=SpacingMark is derived from GC=Mc and includes other general category values
|
||||||
|
writeBest3Level(sink, "spacingMark", graphemeBreaks.table["SpacingMark"]);
|
||||||
|
|
||||||
|
// We use the Grapheme_Cluster_Break=Extend instead of Grapheme_Extend,
|
||||||
|
// Grapheme_Cluster_Break=Extend is derived from Grapheme_Extend and is more complete
|
||||||
|
writeBest3Level(sink, "graphemeExtend", graphemeBreaks.table["Extend"]);
|
||||||
|
|
||||||
|
// emoji related data
|
||||||
|
writeBest3Level(sink, "Extended_Pictographic", emojiData.table["Extended_Pictographic"]);
|
||||||
|
|
||||||
sink.writeln();
|
sink.writeln();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue