static const char *ap_expr_eval_var(ap_expr_eval_ctx *ctx,
const ap_expr_var_func_t *func,
const void *data);
+
+/* define AP_EXPR_DEBUG to log the parse tree when parsing an expression */
+/*#define AP_EXPR_DEBUG */
+#ifdef AP_EXPR_DEBUG
static void expr_dump_tree(const ap_expr *e, const server_rec *s, int loglevel, int indent);
+#endif
static const char *ap_expr_eval_word(ap_expr_eval_ctx *ctx, const ap_expr *node)
{
if (rc) /* XXX can this happen? */
return "syntax error";
- /* XXX Make this properly depend on the loglevel, which requires
- * XXX having a server_rec
- */
- /*
+#ifdef AP_EXPR_DEBUG
if (ctx.expr)
expr_dump_tree(ctx.expr, NULL, APLOG_NOTICE, 2);
- */
+#endif
info->root_node = ctx.expr;
return node;
}
+#ifdef AP_EXPR_DEBUG
#define MARK APLOG_MARK,loglevel,0,s
#define DUMP_E_E(op, e1, e2) \
break;
}
}
+#endif /* AP_EXPR_DEBUG */
+
static int ap_expr_eval_unary_op(ap_expr_eval_ctx *ctx, const ap_expr *info,
const ap_expr *arg)
{