This repository was archived by the owner on Aug 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 99mod parser;
1010mod interpreter;
1111mod analyzer;
12+ mod debug_config;
1213use interpreter:: jit;
1314
1415use ast:: Program ;
@@ -178,11 +179,11 @@ fn format_execution_time(duration_ms: f64) -> String {
178179
179180fn main ( ) {
180181 let args: Vec < String > = std:: env:: args ( ) . collect ( ) ;
181-
182+
182183 if args. len ( ) < 2 {
183184 println ! ( "用法: {} <文件路径> [选项]" , args[ 0 ] ) ;
184185 println ! ( "" ) ;
185- println ! ( "选项 :" ) ;
186+ println ! ( "传统选项 :" ) ;
186187 println ! ( " --cn-parser 显示详细的解析信息" ) ;
187188 println ! ( " --cn-lexer 显示词法分析信息" ) ;
188189 println ! ( " --cn-debug 启用调试模式" ) ;
@@ -193,13 +194,20 @@ fn main() {
193194 println ! ( " --cn-time 显示程序执行时间" ) ;
194195 println ! ( " --cn-rwlock 🚀 v0.6.2 显示读写锁性能统计" ) ;
195196 println ! ( "" ) ;
197+ println ! ( "🆕 v0.7.4 细粒度调试选项:" ) ;
198+ debug_config:: print_debug_help ( ) ;
199+ println ! ( "" ) ;
196200 println ! ( "示例:" ) ;
197201 println ! ( " {} hello.cn" , args[ 0 ] ) ;
198202 println ! ( " {} hello.cn --cn-time" , args[ 0 ] ) ;
199- println ! ( " {} hello.cn --cn-return --cn-time" , args[ 0 ] ) ;
203+ println ! ( " {} hello.cn --debug-jit" , args[ 0 ] ) ;
204+ println ! ( " {} hello.cn --debug-lifetime --cn-time" , args[ 0 ] ) ;
200205 return ;
201206 }
202207
208+ // v0.7.4新增:初始化调试配置
209+ debug_config:: init_debug_config ( & args) ;
210+
203211 let file_path = & args[ 1 ] ;
204212 let debug_parser = args. iter ( ) . any ( |arg| arg == "--cn-parser" ) ;
205213 let debug_lexer = args. iter ( ) . any ( |arg| arg == "--cn-lexer" ) ;
You can’t perform that action at this time.
0 commit comments