return node;
}
+static Node*
+node_new_anychar(void)
+{
+ Node* node = node_new_ctype(CTYPE_ANYCHAR, 0);
+ return node;
+}
+
static Node*
node_new_list(Node* left, Node* right)
{
OPTION_OFF(option, ONIG_OPTION_MULTILINE);
- a = node_new_ctype(CTYPE_ANYCHAR, 0);
+ a = node_new_anychar();
CHECK_NULL_RETURN_MEMERR(a);
o = node_new_option(option);
if (IS_NULL(o)) {
break;
case TK_ANYCHAR:
- *np = node_new_ctype(CTYPE_ANYCHAR, 0);
+ *np = node_new_anychar();
CHECK_NULL_RETURN_MEMERR(*np);
break;
case TK_ANYCHAR_ANYTIME:
- *np = node_new_ctype(CTYPE_ANYCHAR, 0);
+ *np = node_new_anychar();
CHECK_NULL_RETURN_MEMERR(*np);
qn = node_new_quantifier(0, REPEAT_INFINITE, 0);
CHECK_NULL_RETURN_MEMERR(qn);