From ebecaf420e56e4020d92b59d2535d874bebeaeff Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 3 Aug 2015 07:54:56 -0400 Subject: [PATCH] Debug: Display the final parse tree for rc.debug.parser=1. --- src/Context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index 40bc31388..1f59ab699 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -459,6 +459,13 @@ int Context::dispatch (std::string &out) cli2.prepareFilter (); } + // With rc.debug.parser == 3, there are more tree dumps than you might want, + // but we need the rc.debug.parser == 1 case covered also, with the final + // tree. + if (config.getBoolean ("debug") && + config.getInteger ("debug.parser") == 1) + debug (cli2.dump ("Parse Tree")); + return c->execute (out); }