From dbcb4228e0301c241b5d921fd64e6d6139f714e3 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 30 Apr 2023 16:20:01 +0300 Subject: rename to ek --- include/cu/debug.h | 56 ------------------------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 include/cu/debug.h (limited to 'include/cu/debug.h') diff --git a/include/cu/debug.h b/include/cu/debug.h deleted file mode 100644 index 3099b3c..0000000 --- a/include/cu/debug.h +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ - -#ifndef CT_DEBUG_H -#define CT_DEBUG_H - -#include - -#include - -#if DEBUG -#define debug(x, ...) \ - do {fprintf(stderr, "debug: " x "\n",##__VA_ARGS__);} while(0) -#else -#define debug(x, ...) -#endif - -#define error(x, ...) \ - do {fprintf(stderr, "error: " x "\n",##__VA_ARGS__);} while(0) - -#define warn(x, ...) \ - do {fprintf(stderr, "warn: " x "\n",##__VA_ARGS__);} while(0) - -#define info(x, ...) \ - do {fprintf(stderr, "info: " x "\n",##__VA_ARGS__);} while(0) - - -struct file_ctx { - const char *fname; - const char *fbuf; -}; - -char *type_str(struct ast_node *type); -char *call_str(struct ast_node *call); -void semantic_info(struct file_ctx ctx, struct ast_node *node, const char *fmt, - ...); -void semantic_warn(struct file_ctx ctx, struct ast_node *node, const char *fmt, - ...); -void semantic_error(struct file_ctx ctx, struct ast_node *node, const char *fmt, - ...); -void internal_error(const char *fmt, ...); - -enum issue_level { - SRC_INFO, - SRC_WARN, - SRC_ERROR -}; - -struct src_issue { - enum issue_level level; - struct src_loc loc; - struct file_ctx fctx; - size_t offset; -}; - -void src_issue(struct src_issue issue, const char *err_msg, ...); -#endif /* CT_DEBUG_H */ -- cgit v1.3