1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add/change some comments in node_extended_grapheme_cluster() [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2018-12-02 01:33:24 +00:00
parent d359ee3f55
commit 096d362939

View file

@ -5839,8 +5839,10 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
OnigCodePoint sb_out = (ONIGENC_MBC_MINLEN(env->enc) > 1) ? 0x00 : 0x80; OnigCodePoint sb_out = (ONIGENC_MBC_MINLEN(env->enc) > 1) ? 0x00 : 0x80;
if (propname2ctype(env, "Grapheme_Cluster_Break=Extend") < 0) goto err; if (propname2ctype(env, "Grapheme_Cluster_Break=Extend") < 0) goto err;
/* main comment: The order of the code is mostly in reverse of the order /* main comment: The order of the code is backwards (compared to the
* the various expressions appear in the grammar */ * order the various expressions appear in the grammar)
* in the old-style parts. It is forwards in the new-style
* parts (in blocks ending with create_sequence_node()). */
/* Unicode 10.0.0 */ /* Unicode 10.0.0 */
/* CRLF /* CRLF
* | Prepend* * | Prepend*
@ -6109,7 +6111,7 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
seq[3] = NULL_NODE; seq[3] = NULL_NODE;
R_ERR(create_sequence_node(&list2, seq)); R_ERR(create_sequence_node(&list2, seq));
} } /* End of ZWJ (E_Base_GAZ | Glue_After_Zwj) E_Modifier? */
tmp = onig_node_new_alt(list2, alt); tmp = onig_node_new_alt(list2, alt);
if (IS_NULL(tmp)) goto err; if (IS_NULL(tmp)) goto err;
@ -6117,8 +6119,8 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
list2 = NULL; list2 = NULL;
/* Unicode 10.0.0/11.0.0 */ /* Unicode 10.0.0/11.0.0 */
/* this is actually Regional_Indicator+ in Unicode 10.0.0, /* this is Regional_Indicator+ in the Unicode 10.0.0 regular expression,
* but it is Regional_Indicator{2} in Unicode 11.0.0, so no need to fix */ * but the segmentation rules and Unicode 11.0.0 use Regional_Indicator{2}, so no need to fix */
/* RI-Sequence := Regional_Indicator{2} */ /* RI-Sequence := Regional_Indicator{2} */
R_ERR(quantify_property_node(&np1, env, "Regional_Indicator", '2')); R_ERR(quantify_property_node(&np1, env, "Regional_Indicator", '2'));