]> granicus.if.org Git - onig/commitdiff
setup_tree() refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 16 Jun 2017 07:53:58 +0000 (16:53 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 16 Jun 2017 07:53:58 +0000 (16:53 +0900)
src/regcomp.c

index 5fe3c9f13ce78f685745651fa88657f2c203f7aa..74b271d73ee48678ca10d227cde4f3078804bb36 100644 (file)
@@ -3951,23 +3951,12 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
     } while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
     break;
 
-  case NODE_CCLASS:
-    break;
-
   case NODE_STR:
     if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
       r = expand_case_fold_string(node, reg);
     }
     break;
 
-  case NODE_CTYPE:
-    break;
-
-#ifdef USE_SUBEXP_CALL
-  case NODE_CALL:
-    break;
-#endif
-
   case NODE_BREF:
     {
       int i;
@@ -3987,10 +3976,6 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
     }
     break;
 
-  case NODE_QTFR:
-    r = setup_qtfr(node, reg, state, env);
-    break;
-
   case NODE_ENCLOSURE:
     {
       EnclosureNode* en = ENCLOSURE_(node);
@@ -4033,10 +4018,19 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
     }
     break;
 
+  case NODE_QTFR:
+    r = setup_qtfr(node, reg, state, env);
+    break;
+
   case NODE_ANCHOR:
     r = setup_anchor(node, reg, state, env);
     break;
 
+#ifdef USE_SUBEXP_CALL
+  case NODE_CALL:
+#endif
+  case NODE_CTYPE:
+  case NODE_CCLASS:
   default:
     break;
   }