// 命令行解析:支持比赛要求的 -S -o -O1 格式 #pragma once #include struct CLIOptions { std::string input; std::string output; // -o 指定的输出文件路径 bool emit_parse_tree = false; bool emit_ir = false; bool emit_asm = false; bool show_help = false; bool optimize = false; // -O 或 -O1 int opt_level = 0; // 优化级别: 0, 1, 2, 3 }; CLIOptions ParseCLI(int argc, char** argv);