add syntax checking with issue highlighting

This commit is contained in:
2026-10-06 21:02:40 +03:00
parent 0b97baca48
commit 65eb6cf0b1
5 changed files with 231 additions and 15 deletions
+13 -3
View File
@@ -4,13 +4,23 @@
#include "config.h"
#if DEBUG == 1
#define pr_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__ << "\n"
#define pri_debug(...) std::cout << __VA_ARGS__
#define prs_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__
#if PRINT_DISABLE_PREFIXES == 1
#define pr_debug(...) std::cout << "debug: " << __VA_ARGS__ << "\n"
#define pri_debug(...) std::cout << __VA_ARGS__
#define prs_debug(...) std::cout << "debug: " << __VA_ARGS__
#else
#define pr_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__ << "\n"
#define pri_debug(...) std::cout << __VA_ARGS__
#define prs_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__
#endif
#else
#define pr_debug(...) do {} while (0)
#define pri_debug(...) do {} while (0)
#define prs_debug(...) do {} while (0)
#endif
#if PRINT_DISABLE_PREFIXES == 1
#define pr_warn(...) std::cout << "warning: " << __VA_ARGS__ << "\n"
#else
#define pr_warn(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] warning: " << __VA_ARGS__ << "\n"
#endif