Disable context debug output

felipesanches-svg
Marius Kintel 2013-04-09 01:04:36 -04:00
parent 2018a1fb6a
commit 151593705f
4 changed files with 7 additions and 6 deletions

View File

@ -79,7 +79,7 @@ AbstractNode *ImportModule::evaluate(const Context *ctx, const ModuleInstantiati
Context c(ctx);
c.setDocumentPath(evalctx->documentPath());
c.setVariables(argnames, argexpr, evalctx);
#ifdef DEBUG
#if 0 && DEBUG
c.dump(this, inst);
#endif

View File

@ -60,7 +60,7 @@ Value ModuleContext::evaluate_function(const std::string &name, const EvalContex
if (m.second->functions.find(name) != m.second->functions.end()) {
ModuleContext ctx(m.second, this->parent);
// FIXME: Set document path
#ifdef DEBUG
#if 0 && DEBUG
PRINTB("New lib Context for %s func:", name);
ctx.dump(NULL, NULL);
#endif
@ -88,7 +88,7 @@ AbstractNode *ModuleContext::evaluate_module(const ModuleInstantiation &inst, co
if (m.second->modules.find(inst.name()) != m.second->modules.end()) {
ModuleContext ctx(m.second, this->parent);
// FIXME: Set document path
#ifdef DEBUG
#if 0 && DEBUG
PRINT("New lib Context:");
ctx.dump(NULL, &inst);
#endif

View File

@ -120,7 +120,7 @@ AbstractNode *ModuleInstantiation::evaluate_instance(const Context *ctx) const
}
c.children = this->children;
#ifdef DEBUG
#if 0 && DEBUG
PRINT("New eval ctx:");
c.dump(NULL, this);
#endif
@ -161,7 +161,7 @@ AbstractNode *Module::evaluate(const Context *ctx, const ModuleInstantiation *in
ModuleContext c(this, ctx, evalctx);
// FIXME: Set document path to the path of the module
c.set_variable("$children", Value(double(inst->children.size())));
#ifdef DEBUG
#if 0 && DEBUG
c.dump(this, inst);
#endif

View File

@ -351,8 +351,9 @@ int main(int argc, char **argv)
ModuleContext root_ctx;
root_ctx.registerBuiltin();
PRINT("Root Context:");
#if 0 && DEBUG
root_ctx.dump(NULL, NULL);
#endif
fs::path fpath = boosty::absolute(fs::path(filename));
fs::path fparent = fpath.parent_path();
fs::current_path(fparent);