Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 66d1cb7

Browse files
committed
更新调试选项前缀为“--cn-”,修改调试帮助信息以反映新的命令行参数,提升用户体验和一致性。
1 parent 69a40ba commit 66d1cb7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/debug_config.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ impl DebugConfig {
126126
pub fn from_args(&self, args: &[String]) {
127127
for arg in args {
128128
match arg.as_str() {
129-
"--debug-jit" => self.enable_jit_debug(),
130-
"--debug-lifetime" => self.enable_lifetime_debug(),
131-
"--debug-expression" => self.enable_expression_debug(),
132-
"--debug-function" => self.enable_function_debug(),
133-
"--debug-variable" => self.enable_variable_debug(),
134-
"--debug-all" => self.enable_all_debug(),
135-
"--no-debug" => self.disable_all_debug(),
129+
"--cn-debug-jit" => self.enable_jit_debug(),
130+
"--cn-debug-lifetime" => self.enable_lifetime_debug(),
131+
"--cn-debug-expression" => self.enable_expression_debug(),
132+
"--cn-debug-function" => self.enable_function_debug(),
133+
"--cn-debug-variable" => self.enable_variable_debug(),
134+
"--cn-debug-all" => self.enable_all_debug(),
135+
"--cn-no-debug" => self.disable_all_debug(),
136136
_ => {}
137137
}
138138
}
@@ -218,16 +218,16 @@ macro_rules! variable_debug_println {
218218
/// 打印调试帮助信息
219219
pub fn print_debug_help() {
220220
println!("CodeNothing v0.7.4 调试选项:");
221-
println!(" --debug-jit 启用JIT编译调试输出");
222-
println!(" --debug-lifetime 启用生命周期分析调试输出");
223-
println!(" --debug-expression 启用表达式求值调试输出");
224-
println!(" --debug-function 启用函数调用调试输出");
225-
println!(" --debug-variable 启用变量访问调试输出");
226-
println!(" --debug-all 启用所有调试输出");
227-
println!(" --no-debug 禁用所有调试输出");
221+
println!(" --cn-debug-jit 启用JIT编译调试输出");
222+
println!(" --cn-debug-lifetime 启用生命周期分析调试输出");
223+
println!(" --cn-debug-expression 启用表达式求值调试输出");
224+
println!(" --cn-debug-function 启用函数调用调试输出");
225+
println!(" --cn-debug-variable 启用变量访问调试输出");
226+
println!(" --cn-debug-all 启用所有调试输出");
227+
println!(" --cn-no-debug 禁用所有调试输出");
228228
println!();
229229
println!("示例:");
230-
println!(" ./CodeNothing program.cn --debug-jit");
231-
println!(" ./CodeNothing program.cn --debug-lifetime --debug-jit");
232-
println!(" ./CodeNothing program.cn --debug-all");
230+
println!(" ./CodeNothing program.cn --cn-debug-jit");
231+
println!(" ./CodeNothing program.cn --cn-debug-lifetime --cn-debug-jit");
232+
println!(" ./CodeNothing program.cn --cn-debug-all");
233233
}

0 commit comments

Comments
 (0)