Regex: print instruction index in dump_regex

This commit is contained in:
Maxime Coste 2017-10-09 19:29:45 +08:00
parent c8966ca701
commit fb5243f710

View File

@ -820,8 +820,10 @@ private:
void dump_regex(const CompiledRegex& program) void dump_regex(const CompiledRegex& program)
{ {
int count = 0;
for (auto& inst : program.instructions) for (auto& inst : program.instructions)
{ {
printf(" %03d ", count++);
switch (inst.op) switch (inst.op)
{ {
case CompiledRegex::Literal: case CompiledRegex::Literal: