]> granicus.if.org Git - re2c/commitdiff
- Allow more labels
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 29 Apr 2007 22:28:34 +0000 (22:28 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 29 Apr 2007 22:28:34 +0000 (22:28 +0000)
re2c/code.cc

index 08a5428a9e58822f093827eeb8cdd0321a6a56f8..4f1488ab31a20c52198d33cbe1a1aaac790623fe 100644 (file)
@@ -29,8 +29,8 @@ std::string indent(uint ind)
 
 static std::string space(uint this_label)
 {
-       int nl = next_label > 9999 ? 4 : next_label > 999 ? 3 : next_label > 99 ? 2 : next_label > 9 ? 1 : 0;
-       int tl = this_label > 9999 ? 4 : this_label > 999 ? 3 : this_label > 99 ? 2 : this_label > 9 ? 1 : 0;
+       int nl = next_label > 999999 ? 6 : next_label > 99999 ? 5 : next_label > 9999 ? 4 : next_label > 999 ? 3 : next_label > 99 ? 2 : next_label > 9 ? 1 : 0;
+       int tl = this_label > 999999 ? 6 : this_label > 99999 ? 5 : this_label > 9999 ? 4 : this_label > 999 ? 3 : this_label > 99 ? 2 : this_label > 9 ? 1 : 0;
 
        return std::string(std::max(1, nl - tl + 1), ' ');
 }