Debug Mode

- No longer generates parsing diagrams if debug mode is off.
This commit is contained in:
Paul Beckingham 2011-08-23 07:14:26 -04:00
parent 1dc2257156
commit 9641dde54f

View file

@ -1991,6 +1991,8 @@ bool A3::is_operator (
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void A3::dump (const std::string& label) void A3::dump (const std::string& label)
{ {
if (context.config.getBoolean ("debug"))
{
// Set up a color mapping. // Set up a color mapping.
std::map <int, Color> color_map; std::map <int, Color> color_map;
color_map[Arg::cat_program] = Color ("bold blue on blue"); color_map[Arg::cat_program] = Color ("bold blue on blue");
@ -2054,6 +2056,7 @@ void A3::dump (const std::string& label)
out << view.render (); out << view.render ();
context.debug (out.str ()); context.debug (out.str ());
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////