From fb5243f7107a20076a987b61d0f73d74d805fe7d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 9 Oct 2017 19:29:45 +0800 Subject: [PATCH] Regex: print instruction index in dump_regex --- src/regex_impl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 178a5b9fe..0b55c1293 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -820,8 +820,10 @@ private: void dump_regex(const CompiledRegex& program) { + int count = 0; for (auto& inst : program.instructions) { + printf(" %03d ", count++); switch (inst.op) { case CompiledRegex::Literal: