1. 一键安装包 (build-release.ps1) - 打包 pcc.exe + 标准头文件 + Windows 头文件 + 运行时库 - 生成 pcc.bat 启动器,自动设置 include/lib 路径 - 输出: release/pcc-0.9.28-win32.zip (594 KB) 2. GUI 程序支持验证 - -Wl,-subsystem=windows 正确生成 GUI 程序 (PE Subsystem=2) - MessageBox 弹窗测试通过 3. VS Code 插件 (vscode-extension/) - C 语法高亮 (TextMate grammar) - PCC: Build (Ctrl+Shift+B) / PCC: Build & Run (Ctrl+F5) - 可配置 include/lib 路径和 pcc 可执行文件位置 4. Windows API 头文件验证 - 系统信息/时间/注册表/控制台/文件 API 编译运行正常 - PE 导入表格式正确 (kernel32.dll, msvcrt.dll) 5. 测试套件验证 - tests2 基础测试 48/53 通过 - 其余为测试框架差异 (stderr 合并/参数传递),非编译器 bug
156 行
5.0 KiB
JSON
156 行
5.0 KiB
JSON
{
|
|
"name": "C",
|
|
"scopeName": "source.c",
|
|
"fileTypes": ["c", "h"],
|
|
"patterns": [
|
|
{
|
|
"include": "#comments"
|
|
},
|
|
{
|
|
"include": "#strings"
|
|
},
|
|
{
|
|
"include": "#numbers"
|
|
},
|
|
{
|
|
"include": "#keywords"
|
|
},
|
|
{
|
|
"include": "#types"
|
|
},
|
|
{
|
|
"include": "#preprocessor"
|
|
},
|
|
{
|
|
"include": "#functions"
|
|
}
|
|
],
|
|
"repository": {
|
|
"comments": {
|
|
"patterns": [
|
|
{
|
|
"name": "comment.line.double-slash.c",
|
|
"match": "//.*$"
|
|
},
|
|
{
|
|
"name": "comment.block.c",
|
|
"begin": "/\\*",
|
|
"end": "\\*/"
|
|
}
|
|
]
|
|
},
|
|
"strings": {
|
|
"patterns": [
|
|
{
|
|
"name": "string.quoted.double.c",
|
|
"begin": "\"",
|
|
"end": "\"",
|
|
"patterns": [
|
|
{
|
|
"name": "constant.character.escape.c",
|
|
"match": "\\\\(x[0-9a-fA-F]+|[0-7]{1,3}|[abfnrtv\\\\'\"?])"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "string.quoted.single.c",
|
|
"begin": "'",
|
|
"end": "'",
|
|
"patterns": [
|
|
{
|
|
"name": "constant.character.escape.c",
|
|
"match": "\\\\(x[0-9a-fA-F]+|[0-7]{1,3}|[abfnrtv\\\\'\"?])"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"numbers": {
|
|
"patterns": [
|
|
{
|
|
"name": "constant.numeric.c",
|
|
"match": "\\b(0[xX][0-9a-fA-F]+|0[bB][01]+|[0-9]+)([uUlL]{1,3})?\\b"
|
|
},
|
|
{
|
|
"name": "constant.numeric.float.c",
|
|
"match": "\\b[0-9]*\\.[0-9]+([eE][+-]?[0-9]+)?[fFlL]?\\b"
|
|
},
|
|
{
|
|
"name": "constant.numeric.float.c",
|
|
"match": "\\b[0-9]+[eE][+-]?[0-9]+[fFlL]?\\b"
|
|
}
|
|
]
|
|
},
|
|
"keywords": {
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control.c",
|
|
"match": "\\b(if|else|for|while|do|switch|case|default|break|continue|return|goto)\\b"
|
|
},
|
|
{
|
|
"name": "keyword.other.c",
|
|
"match": "\\b(sizeof|typedef|extern|static|const|volatile|inline|register|auto|restrict|_Atomic|_Generic|_Alignas|_Alignof|_Static_assert|_Thread_local)\\b"
|
|
},
|
|
{
|
|
"name": "keyword.operator.c",
|
|
"match": "\\b(sizeof|typeof)\\b"
|
|
}
|
|
]
|
|
},
|
|
"types": {
|
|
"patterns": [
|
|
{
|
|
"name": "storage.type.c",
|
|
"match": "\\b(void|char|short|int|long|float|double|signed|unsigned|_Bool|_Complex|struct|union|enum)\\b"
|
|
},
|
|
{
|
|
"name": "storage.type.builtin.c",
|
|
"match": "\\b(size_t|ssize_t|ptrdiff_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|intptr_t|uintptr_t|FILE|va_list|wchar_t)\\b"
|
|
}
|
|
]
|
|
},
|
|
"preprocessor": {
|
|
"patterns": [
|
|
{
|
|
"name": "meta.preprocessor.c",
|
|
"begin": "^\\s*#\\s*(include|import)\\b",
|
|
"end": "$",
|
|
"patterns": [
|
|
{
|
|
"name": "string.quoted.double.include.c",
|
|
"match": "\"[^\"]*\""
|
|
},
|
|
{
|
|
"name": "string.quoted.other.lt-gt.include.c",
|
|
"match": "<[^>]*>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "meta.preprocessor.macro.c",
|
|
"begin": "^\\s*#\\s*(define|undef)\\b",
|
|
"end": "$",
|
|
"patterns": [
|
|
{
|
|
"name": "entity.name.function.preprocessor.c",
|
|
"match": "\\w+"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "meta.preprocessor.conditional.c",
|
|
"match": "^\\s*#\\s*(if|ifdef|ifndef|elif|else|endif|pragma|error|warning)\\b"
|
|
}
|
|
]
|
|
},
|
|
"functions": {
|
|
"patterns": [
|
|
{
|
|
"name": "meta.function.c",
|
|
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=\\()"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|