forked from sqmedeiros/lpeglabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlplprint.h
36 lines (23 loc) · 758 Bytes
/
lplprint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
** $Id: lplprint.h $
*/
#if !defined(lplprint_h)
#define lplprint_h
#include "lpltree.h"
#include "lplvm.h"
#if defined(LPEG_DEBUG)
LUAI_FUNC void printpatt (Instruction *p, int n);
LUAI_FUNC void printtree (TTree *tree, int ident);
LUAI_FUNC void printktable (lua_State *L, int idx);
LUAI_FUNC void printcharset (const byte *st);
LUAI_FUNC void printcaplist (Capture *cap, Capture *limit);
LUAI_FUNC void printinst (const Instruction *op, const Instruction *p);
#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,n) \
luaL_error(L, "function only implemented in debug mode")
#endif
#endif