mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use create_sequence_node() once more
One more use of create_sequence_node() in node_extended_grapheme_cluster (several more to come). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
110273c534
commit
b4e39021f2
1 changed files with 9 additions and 19 deletions
28
regparse.c
28
regparse.c
|
@ -5968,28 +5968,18 @@ node_extended_grapheme_cluster(Node** np, ScanEnv* env)
|
||||||
/* Unicode 10.0.0 */
|
/* Unicode 10.0.0 */
|
||||||
/* Emoji sequence := (E_Base | EBG) Extend* E_Modifier?
|
/* Emoji sequence := (E_Base | EBG) Extend* E_Modifier?
|
||||||
* (ZWJ (Glue_After_Zwj | EBG Extend* E_Modifier?) )* */
|
* (ZWJ (Glue_After_Zwj | EBG Extend* E_Modifier?) )* */
|
||||||
|
|
||||||
/* ZWJ (Glue_After_Zwj | E_Base_GAZ Extend* E_Modifier?) */
|
/* ZWJ (Glue_After_Zwj | E_Base_GAZ Extend* E_Modifier?) */
|
||||||
R_ERR(quantify_property_node(&np1, env, "Grapheme_Cluster_Break=E_Modifier", '?'));
|
|
||||||
|
|
||||||
tmp = node_new_list(np1, NULL_NODE);
|
/* E_Base_GAZ Extend* E_Modifier? */
|
||||||
if (IS_NULL(tmp)) goto err;
|
{
|
||||||
list2 = tmp;
|
Node* seq[4];
|
||||||
np1 = NULL;
|
R_ERR(create_property_node(seq+0, env, "Grapheme_Cluster_Break=E_Base_GAZ"));
|
||||||
|
R_ERR(quantify_property_node(seq+1, env, "Grapheme_Cluster_Break=Extend", '*'));
|
||||||
|
R_ERR(quantify_property_node(seq+2, env, "Grapheme_Cluster_Break=E_Modifier", '?'));
|
||||||
|
|
||||||
R_ERR(quantify_property_node(&np1, env, "Grapheme_Cluster_Break=Extend", '*'));
|
seq[3] = NULL_NODE;
|
||||||
|
R_ERR(create_sequence_node(&list2, seq));
|
||||||
tmp = node_new_list(np1, list2);
|
}
|
||||||
if (IS_NULL(tmp)) goto err;
|
|
||||||
list2 = tmp;
|
|
||||||
np1 = NULL;
|
|
||||||
|
|
||||||
R_ERR(create_property_node(&np1, env, "Grapheme_Cluster_Break=E_Base_GAZ"));
|
|
||||||
|
|
||||||
tmp = node_new_list(np1, list2);
|
|
||||||
if (IS_NULL(tmp)) goto err;
|
|
||||||
list2 = tmp;
|
|
||||||
np1 = NULL;
|
|
||||||
|
|
||||||
tmp = onig_node_new_alt(list2, NULL_NODE);
|
tmp = onig_node_new_alt(list2, NULL_NODE);
|
||||||
if (IS_NULL(tmp)) goto err;
|
if (IS_NULL(tmp)) goto err;
|
||||||
|
|
Loading…
Reference in a new issue