feat(compiler): 添加对裸机环境的支持并改进构建配置

- 更新README描述为C语言裸机环境的自举编译器
- 修改justfile中的构建命令,添加--dev参数并将输出文件名从scc.exe改为scc
- 在AST定义中添加SCC_AST_UNKNOWN节点类型
- 修复位置日志格式化中的类型错误
- 实现标准输出流支持,当输出文件为'-'时输出到控制台
- 支持基于环境变量LANG的语言本地化选择

fix(lexer): 改进标记打印功能

- 修复换行符的显示,将实际换行符显示为"\n"
- 改进文件输出逻辑,支持标准输出流

refactor(build): 更新cbuild工具的包含路径

- 将包含路径从"scc_libs"更改为"scc_include"

test: 添加简单的包含测试用例

- 新增测试文件tests/simple/12_include.c用于测试头文件包含功能
This commit is contained in:
zzy
2026-02-26 16:07:19 +08:00
parent 13de9d713b
commit 4e2176b7f0
8 changed files with 54 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ extern logger_t __scc_usr_log;
do { \
char _full_msg[LOGGER_MAX_BUF_SIZE]; \
int _n = snprintf_(_full_msg, sizeof(_full_msg), \
"%s:%lu:%lu: ", (pos).name, (pos).line, (pos).col); \
"%s:%u:%u: ", (pos).name, (pos).line, (pos).col); \
snprintf_(_full_msg + _n, sizeof(_full_msg) - _n, fmt, ##__VA_ARGS__); \
__scc_usr_log.handler(&__scc_usr_log, level, null, 0, null, "%s", \
_full_msg); \