feat(cbuild): 添加SCC编译器支持并更新构建脚本

添加了新的SccCompiler类以支持SCC编译器,包括编译和链接功能。
更新了justfile中的构建任务,添加了clean、build、build-install和test-scc等新任务。
同时修复了异常处理语法错误并将wc.py工具文件移除。
This commit is contained in:
zzy
2026-02-21 16:02:53 +08:00
parent 8007825800
commit 4940b652eb
3 changed files with 43 additions and 58 deletions

View File

@@ -15,5 +15,19 @@ count-file:
# you need download `tokei` it can download by cargo
tokei libs runtime src -e tests --files
build_lexer:
python ./tools/cbuild/cbuild.py --path libs/lexer build
clean:
cbuild clean
build:
cbuild build -cclang
build-install: build
cp ./build/dev/scc.exe ./scc.exe
test-scc:
# windows: (Get-Content a.txt -Raw) -replace '\x1b\[[0-9;]*[a-zA-Z]', '' | Set-Content clean.txt
# linux: sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' a.txt > clean.txt
just clean
just build-install
just clean
cbuild run -cscc -- -h