|
sammine-lang
|
LLVM-style debug logging infrastructure. More...
#include <string>

Go to the source code of this file.
Macros | |
| #define | LOG(X) |
Functions | |
| void | sammine_log::set_enabled_types (const std::string &types_str) |
| Set the enabled debug types from command line (semicolon-separated). | |
| const std::string & | sammine_log::get_enabled_types () |
| Get the enabled debug types string. | |
| bool | sammine_log::is_type_in_list (const char *type, const std::string &list) |
| Check if type is in semicolon-separated list. | |
LLVM-style debug logging infrastructure.
This file provides LLVM-style debug logging capabilities where each source file can define DEBUG_TYPE to categorize its debug output, and users can enable specific debug types via the –diagnostics CLI flag.
Usage:
| #define LOG | ( | X | ) |
LOG - Conditionally execute debug logging code
Example: LOG({ fmt::print(stderr, "[lexer] Token count: {}\n", count); });
Note: DEBUG_TYPE must be defined before using this macro.