From 8abc2967f72b0aead0135a75283018cebbd7998d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 31 Oct 2014 20:02:33 -0400 Subject: [PATCH] CLI - Added debug.parser=3 support to ::insertJunctions. --- src/CLI.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/CLI.cpp b/src/CLI.cpp index 3b01bbc9a..3945c691e 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -1552,6 +1552,7 @@ void CLI::findAttributes () // void CLI::insertJunctions () { + bool changes = false; std::vector reconstructed; std::vector ::iterator prev = _args.begin (); std::vector ::iterator a; @@ -1575,6 +1576,7 @@ void CLI::insertJunctions () opOr.tag ("FILTER"); opOr.tag ("OP"); reconstructed.push_back (opOr); + changes = true; } } @@ -1585,7 +1587,13 @@ void CLI::insertJunctions () reconstructed.push_back (*a); } - _args = reconstructed; + if (changes) + { + _args = reconstructed; + + if (context.config.getInteger ("debug.parser") >= 3) + context.debug (context.cli.dump ("CLI::analyze insertJunctions")); + } } ////////////////////////////////////////////////////////////////////////////////