prefix notation type parser
This commit is contained in:
parent
9b24c8a496
commit
9ac779c1cf
14 changed files with 1217 additions and 151 deletions
|
@ -10,11 +10,31 @@
|
|||
|
||||
#define MSPH_ERR_SYS 0x0001
|
||||
|
||||
#define MSPH_ERR_INVAL 0x1001
|
||||
#define MSPH_ERR_INVAL 0x0002
|
||||
|
||||
#define MSPH_ERR_TOOLONG 0x2001
|
||||
#define MSPH_ERR_TOKEN_TOOLONG 0x1001
|
||||
#define MSPH_ERR_TOKEN_EOF 0x1002
|
||||
#define MSPH_ERR_TOKEN_NOMATCH 0x1003
|
||||
#define MSPH_ERR_TOKEN_INVAL 0x1004
|
||||
|
||||
#define MSPH_ERR_TREE_TOOLONG 0x2001
|
||||
#define MSPH_ERR_TREE_EOF 0x2002
|
||||
#define MSPH_ERR_TREE_NOMATCH 0x2003
|
||||
|
||||
|
||||
// TODO add more diagnostics
|
||||
|
||||
#define MSPH_ERR(ctx, e) SPHO_ERR(ctx, e)
|
||||
#define MSPH_TOKS_ERR(toks, e) MSPH_ERR((toks)->ctx, e)
|
||||
|
||||
#define MSPH_ERR_INFO(ctx, e, info) SPHO_ERR_INFO(ctx, e, info)
|
||||
|
||||
|
||||
#define MSPH_ERR_RESET(ctx) \
|
||||
do { \
|
||||
ctx->err = 0; \
|
||||
ctx->err_info = 0; \
|
||||
} while (0)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue