From eb8b906d5eb5113e7377f06afbfd641c1c5e6a1e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 14 Apr 2025 17:16:19 -0300 Subject: Some refactoring in debug code Functions lp_printtree and lp_printcode moved to lpprint.c, to concentrate there debug/testing code. --- lpprint.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lpprint.h') diff --git a/lpprint.h b/lpprint.h index e8e04e8..e693081 100644 --- a/lpprint.h +++ b/lpprint.h @@ -9,24 +9,16 @@ #if defined(LPEG_DEBUG) -void printpatt (Instruction *p); -void printtree (TTree *tree, int ident); -void printktable (lua_State *L, int idx); -void printcharset (const byte *st); -void printcaplist (Capture *cap); +void printcaplist (Capture *cap, Capture *fin); void printinst (const Instruction *op, const Instruction *p); +void opendebug (lua_State *L); + #else -#define printktable(L,idx) \ - luaL_error(L, "function only implemented in debug mode") -#define printtree(tree,i) \ - luaL_error(L, "function only implemented in debug mode") -#define printpatt(p) \ - luaL_error(L, "function only implemented in debug mode") +#define opendebug(L) { /* no op */ } #endif - #endif -- cgit v1.2.3-55-g6feb