Revert "可以处理生成加法的IR"

This commit is contained in:
jing
2025-12-29 15:49:30 +08:00
parent e941cced9b
commit 8903bf73f9
42 changed files with 158 additions and 919 deletions

View File

@@ -1,12 +1,5 @@
#include "utils/CLI.h"
// 命令行参数解析:
// - 解析输入/输出路径
// - 解析输出类型IR/MIR/ASM与优化级别等选项
// - 将参数传递给 main.cpp 的编译流水线驱动
#include <stdexcept>
CLIOptions ParseCLI(int argc, char** argv) {
if (argc <= 1) {
throw std::runtime_error("用法: compiler <input.sy>");
}
CLIOptions opt;
opt.input = argv[1];
return opt;
}

View File

@@ -1,10 +0,0 @@
// 简易命令行解析:仅支持输入文件路径。
#pragma once
#include <string>
struct CLIOptions {
std::string input;
};
CLIOptions ParseCLI(int argc, char** argv);

View File

@@ -1 +1,4 @@
#include "utils/Log.h"
// 日志模块:
// - 统一输出调试信息、阶段信息与错误信息
// - 提供可配置的日志级别与输出位置(按需要实现)

View File

@@ -1,7 +0,0 @@
// 轻量日志接口。
#pragma once
#include <iostream>
#define LOG_INFO(msg) std::cerr << "[info] " << msg << "\n"
#define LOG_ERROR(msg) std::cerr << "[error] " << msg << "\n"