refactor: 迁出日志宏,移除直接依赖

This commit is contained in:
2026-06-26 18:53:48 +08:00
parent 1dae260646
commit e4abfd7599
24 changed files with 214 additions and 280 deletions
+1
View File
@@ -9,6 +9,7 @@ description = "OxideJS - AST to bytecode compiler"
[dependencies]
oxide_bytecode = { path = "../oxide_bytecode" }
oxide_parser = { path = "../oxide_parser" }
oxide_log = { path = "../oxide_log" }
serde.workspace = true
serde_json.workspace = true
rustc-hash.workspace = true
+34
View File
@@ -0,0 +1,34 @@
#[macro_export]
macro_rules! compiler_error {
($($arg:tt)*) => {
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::ERROR, $($arg)*)
};
}
#[macro_export]
macro_rules! compiler_warn {
($($arg:tt)*) => {
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::WARN, $($arg)*)
};
}
#[macro_export]
macro_rules! compiler_info {
($($arg:tt)*) => {
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::INFO, $($arg)*)
};
}
#[macro_export]
macro_rules! compiler_debug {
($($arg:tt)*) => {
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::DEBUG, $($arg)*)
};
}
#[macro_export]
macro_rules! compiler_trace {
($($arg:tt)*) => {
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::TRACE, $($arg)*)
};
}
+1
View File
@@ -1,6 +1,7 @@
#![doc = "OxideJS - AST to bytecode compiler"]
pub mod compiler;
pub mod compiler_log;
pub mod counter;
pub mod emit_ctx;
pub mod emitter;