From 255d7b212612be84b63848160df282ef85733f36 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 31 Oct 2014 19:57:40 -0400 Subject: [PATCH] CLI - Added debug.parser=3 support to ::desugarTags. --- src/CLI.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/CLI.cpp b/src/CLI.cpp index 6d0cc8d34..b848b96a6 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -744,6 +744,7 @@ bool CLI::exactMatch ( // -tag --> tags _notag_ tag void CLI::desugarTags () { + bool changes = false; std::vector reconstructed; std::vector ::iterator a; for (a = _args.begin (); a != _args.end (); ++a) @@ -773,6 +774,8 @@ void CLI::desugarTags () right.tag ("LITERAL"); right.tag ("FILTER"); reconstructed.push_back (right); + + changes = true; } else reconstructed.push_back (*a); @@ -781,7 +784,13 @@ void CLI::desugarTags () reconstructed.push_back (*a); } - _args = reconstructed; + if (changes) + { + _args = reconstructed; + + if (context.config.getInteger ("debug.parser") >= 3) + context.debug (context.cli.dump ("CLI::analyze desugarTags")); + } } ////////////////////////////////////////////////////////////////////////////////