]> granicus.if.org Git - onig/commitdiff
fix indent
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 25 Jul 2017 04:04:55 +0000 (13:04 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 25 Jul 2017 04:04:55 +0000 (13:04 +0900)
src/regparse.c

index 7147049e890a1ad76036ed6cef66337f18ee1af8..ee32861f2cc79ff15095a3bba10d8c00cef5a32c 100644 (file)
@@ -5629,7 +5629,7 @@ parse_enclosure(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
         Node* absent;
         Node* expr;
         int head_bar;
-       int is_range_cutter;
+        int is_range_cutter;
 
         if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
 
@@ -5651,27 +5651,27 @@ parse_enclosure(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
         }
 
         expr = NULL_NODE;
-       is_range_cutter = 0;
+        is_range_cutter = 0;
         if (head_bar != 0) {
           Node* top = absent;
           if (NODE_TYPE(top) != NODE_ALT || IS_NULL(NODE_CDR(top))) {
-           expr = NULL_NODE;
-           is_range_cutter = 1;
+            expr = NULL_NODE;
+            is_range_cutter = 1;
             //return ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN;
           }
-         else {
-           absent = NODE_CAR(top);
-           expr   = NODE_CDR(top);
-           NODE_CAR(top) = NULL_NODE;
-           NODE_CDR(top) = NULL_NODE;
-           onig_node_free(top);
-           if (IS_NULL(NODE_CDR(expr))) {
-             top = expr;
-             expr = NODE_CAR(top);
-             NODE_CAR(top) = NULL_NODE;
-             onig_node_free(top);
-           }
-         }
+          else {
+            absent = NODE_CAR(top);
+            expr   = NODE_CDR(top);
+            NODE_CAR(top) = NULL_NODE;
+            NODE_CDR(top) = NULL_NODE;
+            onig_node_free(top);
+            if (IS_NULL(NODE_CDR(expr))) {
+              top = expr;
+              expr = NODE_CAR(top);
+              NODE_CAR(top) = NULL_NODE;
+              onig_node_free(top);
+            }
+          }
         }
 
         r = make_absent_tree(np, absent, expr, is_range_cutter, env);