diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-04-14 17:16:19 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-04-14 17:16:19 -0300 |
| commit | eb8b906d5eb5113e7377f06afbfd641c1c5e6a1e (patch) | |
| tree | 7854589b2605df9f3d97b56d64b72eac3a579b3f /lpprint.h | |
| parent | 0ac14cf58c5b1c954e979dc35e50e610e8dd5115 (diff) | |
| download | lpeg-eb8b906d5eb5113e7377f06afbfd641c1c5e6a1e.tar.gz lpeg-eb8b906d5eb5113e7377f06afbfd641c1c5e6a1e.tar.bz2 lpeg-eb8b906d5eb5113e7377f06afbfd641c1c5e6a1e.zip | |
Some refactoring in debug code
Functions lp_printtree and lp_printcode moved to lpprint.c, to
concentrate there debug/testing code.
Diffstat (limited to 'lpprint.h')
| -rw-r--r-- | lpprint.h | 16 |
1 files changed, 4 insertions, 12 deletions
| @@ -9,24 +9,16 @@ | |||
| 9 | 9 | ||
| 10 | #if defined(LPEG_DEBUG) | 10 | #if defined(LPEG_DEBUG) |
| 11 | 11 | ||
| 12 | void printpatt (Instruction *p); | 12 | void printcaplist (Capture *cap, Capture *fin); |
| 13 | void printtree (TTree *tree, int ident); | ||
| 14 | void printktable (lua_State *L, int idx); | ||
| 15 | void printcharset (const byte *st); | ||
| 16 | void printcaplist (Capture *cap); | ||
| 17 | void printinst (const Instruction *op, const Instruction *p); | 13 | void printinst (const Instruction *op, const Instruction *p); |
| 18 | 14 | ||
| 15 | void opendebug (lua_State *L); | ||
| 16 | |||
| 19 | #else | 17 | #else |
| 20 | 18 | ||
| 21 | #define printktable(L,idx) \ | 19 | #define opendebug(L) { /* no op */ } |
| 22 | luaL_error(L, "function only implemented in debug mode") | ||
| 23 | #define printtree(tree,i) \ | ||
| 24 | luaL_error(L, "function only implemented in debug mode") | ||
| 25 | #define printpatt(p) \ | ||
| 26 | luaL_error(L, "function only implemented in debug mode") | ||
| 27 | 20 | ||
| 28 | #endif | 21 | #endif |
| 29 | 22 | ||
| 30 | |||
| 31 | #endif | 23 | #endif |
| 32 | 24 | ||
