Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d0c08100
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d0c08100
编写于
8月 13, 2019
作者:
A
Alex Ross
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update C grammars
上级
22e31cc3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
283 addition
and
39 deletion
+283
-39
extensions/cpp/cgmanifest.json
extensions/cpp/cgmanifest.json
+2
-2
extensions/cpp/syntaxes/cpp.tmLanguage.json
extensions/cpp/syntaxes/cpp.tmLanguage.json
+253
-9
extensions/cpp/test/colorize-results/test-23630_cpp.json
extensions/cpp/test/colorize-results/test-23630_cpp.json
+9
-9
extensions/cpp/test/colorize-results/test-23850_cpp.json
extensions/cpp/test/colorize-results/test-23850_cpp.json
+9
-9
extensions/cpp/test/colorize-results/test_cc.json
extensions/cpp/test/colorize-results/test_cc.json
+10
-10
未找到文件。
extensions/cpp/cgmanifest.json
浏览文件 @
d0c08100
...
...
@@ -6,11 +6,11 @@
"git"
:
{
"name"
:
"jeff-hykin/cpp-textmate-grammar"
,
"repositoryUrl"
:
"https://github.com/jeff-hykin/cpp-textmate-grammar"
,
"commitHash"
:
"
218448eb46260864352d569db13be6cb20767e92
"
"commitHash"
:
"
031ef619bef4c5a1ca46e6fa69d7c913e0c32068
"
}
},
"license"
:
"MIT"
,
"version"
:
"1.1
2.21
"
,
"version"
:
"1.1
3.2
"
,
"description"
:
"The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{
...
...
extensions/cpp/syntaxes/cpp.tmLanguage.json
浏览文件 @
d0c08100
...
...
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/
74c2c0eaad8f647e98a188da0f95a64f7239cbe0
",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/
031ef619bef4c5a1ca46e6fa69d7c913e0c32068
",
"name": "C++",
"scopeName": "source.cpp",
"patterns": [
...
...
@@ -121,6 +121,250 @@
"match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)",
"name": "entity.name.function.preprocessor.cpp"
},
"preprocessor_number_literal": {
"begin": "(?<!\\w)(?=\\d|\\.\\d)",
"end": "(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"patterns": [
{
"match": "(\\G0[xX])([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?<!')([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?([lLfF](?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.hexadecimal.cpp"
},
"2": {
"name": "constant.numeric.hexadecimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"4": {
"name": "constant.numeric.hexadecimal.cpp"
},
"5": {
"name": "constant.numeric.hexadecimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"6": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"8": {
"name": "keyword.other.unit.exponent.hexadecimal.cpp"
},
"9": {
"name": "keyword.operator.plus.exponent.hexadecimal.cpp"
},
"10": {
"name": "keyword.operator.minus.exponent.hexadecimal.cpp"
},
"11": {
"name": "constant.numeric.exponent.hexadecimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"12": {
"name": "keyword.other.unit.suffix.floating-point.cpp"
}
}
},
{
"match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?:(?<=[0-9])\\.|\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)?((?<!')([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?([lLfF](?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"2": {
"name": "constant.numeric.decimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"4": {
"name": "constant.numeric.decimal.point.cpp"
},
"5": {
"name": "constant.numeric.decimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"6": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"8": {
"name": "keyword.other.unit.exponent.decimal.cpp"
},
"9": {
"name": "keyword.operator.plus.exponent.decimal.cpp"
},
"10": {
"name": "keyword.operator.minus.exponent.decimal.cpp"
},
"11": {
"name": "constant.numeric.exponent.decimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"12": {
"name": "keyword.other.unit.suffix.floating-point.cpp"
}
}
},
{
"match": "(\\G0[bB])([01](?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.binary.cpp"
},
"2": {
"name": "constant.numeric.binary.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"4": {
"name": "keyword.other.unit.suffix.integer.cpp"
}
}
},
{
"match": "(\\G0)((?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))+)((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.octal.cpp"
},
"2": {
"name": "constant.numeric.octal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"4": {
"name": "keyword.other.unit.suffix.integer.cpp"
}
}
},
{
"match": "(\\G0[xX])([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?<!')([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"1": {
"name": "keyword.other.unit.hexadecimal.cpp"
},
"2": {
"name": "constant.numeric.hexadecimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"5": {
"name": "keyword.other.unit.exponent.hexadecimal.cpp"
},
"6": {
"name": "keyword.operator.plus.exponent.hexadecimal.cpp"
},
"7": {
"name": "keyword.operator.minus.exponent.hexadecimal.cpp"
},
"8": {
"name": "constant.numeric.exponent.hexadecimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"9": {
"name": "keyword.other.unit.suffix.integer.cpp"
}
}
},
{
"match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)((?<!')([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])))*)))?((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w))?(?!(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-]))",
"captures": {
"2": {
"name": "constant.numeric.decimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"3": {
"name": "punctuation.separator.constant.numeric.cpp"
},
"5": {
"name": "keyword.other.unit.exponent.decimal.cpp"
},
"6": {
"name": "keyword.operator.plus.exponent.decimal.cpp"
},
"7": {
"name": "keyword.operator.minus.exponent.decimal.cpp"
},
"8": {
"name": "constant.numeric.exponent.decimal.cpp",
"patterns": [
{
"match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])",
"name": "punctuation.separator.constant.numeric.cpp"
}
]
},
"9": {
"name": "keyword.other.unit.suffix.integer.cpp"
}
}
},
{
"match": "(?:(?:[0-9a-zA-Z_\\.]|')|(?<=[eEpP])[+-])+",
"name": "invalid.illegal.constant.numeric.cpp"
}
]
},
"pragma_mark": {
"match": "((?:^)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(#)\\s*pragma\\s+mark)\\s+(.*)",
"captures": {
...
...
@@ -210,7 +454,7 @@
"name": "entity.other.attribute-name.pragma.preprocessor.cpp"
},
{
"include": "#number_literal"
"include": "#
preprocessor_
number_literal"
},
{
"include": "#line_continuation_character"
...
...
@@ -417,7 +661,7 @@
"include": "#string_context_c"
},
{
"include": "#number_literal"
"include": "#
preprocessor_
number_literal"
},
{
"include": "#line_continuation_character"
...
...
@@ -425,7 +669,7 @@
]
},
"diagnostic": {
"name": "meta.preprocessor.diagnostic.cpp",
"name": "meta.preprocessor.diagnostic.
$reference(directive).
cpp",
"begin": "((?:^)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(#)\\s*((?:error|warning)))\\b\\s*",
"beginCaptures": {
"1": {
...
...
@@ -667,13 +911,13 @@
"begin": "\\G\\s*(\\()",
"beginCaptures": {
"1": {
"name": "punctuation.definition.parameters.begin.cpp"
"name": "punctuation.definition.parameters.begin.
preprocessor.
cpp"
}
},
"end": "(\\))",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.cpp"
"name": "punctuation.definition.parameters.end.
preprocessor.
cpp"
}
},
"patterns": [
...
...
@@ -745,7 +989,7 @@
},
"patterns": [
{
"name": "meta.
conditional.preprocessor
.cpp",
"name": "meta.
preprocessor.conditional
.cpp",
"begin": "\\G(?<=ifndef|ifdef|if)",
"end": "(?<!\\\\)(?=\\n)",
"patterns": [
...
...
@@ -774,7 +1018,7 @@
"include": "#string_context_c"
},
{
"include": "#number_literal"
"include": "#
preprocessor_
number_literal"
},
{
"include": "#operators"
...
...
@@ -1236,7 +1480,7 @@
"name": "meta.toc-list.banner.block.cpp"
},
"6": {
"name": "comment.line.b
lock
.cpp"
"name": "comment.line.b
anner
.cpp"
},
"7": {
"name": "punctuation.definition.comment.cpp"
...
...
extensions/cpp/test/colorize-results/test-23630_cpp.json
浏览文件 @
d0c08100
...
...
@@ -23,23 +23,23 @@
},
{
"c"
:
" "
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp"
,
"r"
:
{
"dark_plus"
:
"
default: #D4D4D4
"
,
"light_plus"
:
"
default: #000000
"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"hc_black"
:
"
default: #FFFFFF
"
"dark_plus"
:
"
meta.preprocessor: #569CD6
"
,
"light_plus"
:
"
meta.preprocessor: #0000FF
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"
meta.preprocessor: #569CD6
"
}
},
{
"c"
:
"_UCRT"
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp entity.name.function.preprocessor.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp entity.name.function.preprocessor.cpp"
,
"r"
:
{
"dark_plus"
:
"entity.name.function: #DCDCAA"
,
"light_plus"
:
"entity.name.function: #795E26"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"entity.name.function: #DCDCAA"
}
},
...
...
extensions/cpp/test/colorize-results/test-23850_cpp.json
浏览文件 @
d0c08100
...
...
@@ -23,23 +23,23 @@
},
{
"c"
:
" "
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp"
,
"r"
:
{
"dark_plus"
:
"
default: #D4D4D4
"
,
"light_plus"
:
"
default: #000000
"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"hc_black"
:
"
default: #FFFFFF
"
"dark_plus"
:
"
meta.preprocessor: #569CD6
"
,
"light_plus"
:
"
meta.preprocessor: #0000FF
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"
meta.preprocessor: #569CD6
"
}
},
{
"c"
:
"_UCRT"
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp entity.name.function.preprocessor.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp entity.name.function.preprocessor.cpp"
,
"r"
:
{
"dark_plus"
:
"entity.name.function: #DCDCAA"
,
"light_plus"
:
"entity.name.function: #795E26"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"entity.name.function: #DCDCAA"
}
},
...
...
extensions/cpp/test/colorize-results/test_cc.json
浏览文件 @
d0c08100
...
...
@@ -23,23 +23,23 @@
},
{
"c"
:
" "
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp"
,
"r"
:
{
"dark_plus"
:
"
default: #D4D4D4
"
,
"light_plus"
:
"
default: #000000
"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"hc_black"
:
"
default: #FFFFFF
"
"dark_plus"
:
"
meta.preprocessor: #569CD6
"
,
"light_plus"
:
"
meta.preprocessor: #0000FF
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"
meta.preprocessor: #569CD6
"
}
},
{
"c"
:
"B4G_DEBUG_CHECK"
,
"t"
:
"source.cpp meta.
conditional.preprocessor
.cpp entity.name.function.preprocessor.cpp"
,
"t"
:
"source.cpp meta.
preprocessor.conditional
.cpp entity.name.function.preprocessor.cpp"
,
"r"
:
{
"dark_plus"
:
"entity.name.function: #DCDCAA"
,
"light_plus"
:
"entity.name.function: #795E26"
,
"dark_vs"
:
"
default: #D4D4D4
"
,
"light_vs"
:
"
default: #000000
"
,
"dark_vs"
:
"
meta.preprocessor: #569CD6
"
,
"light_vs"
:
"
meta.preprocessor: #0000FF
"
,
"hc_black"
:
"entity.name.function: #DCDCAA"
}
},
...
...
@@ -1979,4 +1979,4 @@
"hc_black"
:
"default: #FFFFFF"
}
}
]
]
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录