stage1 人工重构ast.c
This commit is contained in:
17
stage1/spl_dbg.h
Normal file
17
stage1/spl_dbg.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef __SPL_DBG_H__
|
||||
#define __SPL_DBG_H__
|
||||
|
||||
#include "spl_tok.h"
|
||||
|
||||
typedef struct {
|
||||
const char *dbg_name;
|
||||
const char *fpath;
|
||||
int line;
|
||||
int col;
|
||||
} spl_dbg_node_t;
|
||||
|
||||
#define SPL_FATAL(tok, fmt, ...) \
|
||||
LOG_FATAL("fatal at %s:%zd:%zd " fmt, ((tok) && (tok)->fname ? (tok)->fname : "<null>"), \
|
||||
((tok) ? (tok)->line : 0), ((tok) ? (tok)->col : 0), ##__VA_ARGS__)
|
||||
|
||||
#endif /* __SPL_DBG_H__ */
|
||||
Reference in New Issue
Block a user