Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6b48d583
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,发现更多精彩内容 >>
提交
6b48d583
编写于
5月 18, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[rust] update grammar
上级
b2c10e50
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
210 addition
and
63 deletion
+210
-63
extensions/rust/syntaxes/rust.tmLanguage.json
extensions/rust/syntaxes/rust.tmLanguage.json
+82
-56
extensions/rust/test/colorize-results/test-6611_rs.json
extensions/rust/test/colorize-results/test-6611_rs.json
+128
-7
未找到文件。
extensions/rust/syntaxes/rust.tmLanguage.json
浏览文件 @
6b48d583
...
...
@@ -158,6 +158,11 @@
"name"
:
"support.type.std.rust"
,
"match"
:
"
\\
b(ToOwned|ToString)
\\
b"
},
"type"
:
{
"comment"
:
"A type"
,
"name"
:
"entity.name.type.rust"
,
"match"
:
"
\\
b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)
\\
b"
},
"type_params"
:
{
"comment"
:
"Type parameters"
,
"name"
:
"meta.type_params.rust"
,
...
...
@@ -201,6 +206,61 @@
}
},
"patterns"
:
[
{
"comment"
:
"Implementation"
,
"begin"
:
"
\\
b(impl)
\\
b"
,
"end"
:
"
\\
{"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.type.rust"
}
},
"patterns"
:
[
{
"include"
:
"#block_comment"
},
{
"include"
:
"#line_comment"
},
{
"include"
:
"#sigils"
},
{
"include"
:
"#mut"
},
{
"include"
:
"#ref_lifetime"
},
{
"include"
:
"#core_types"
},
{
"include"
:
"#core_marker"
},
{
"include"
:
"#core_traits"
},
{
"include"
:
"#std_types"
},
{
"include"
:
"#std_traits"
},
{
"include"
:
"#type_params"
},
{
"include"
:
"#where"
},
{
"name"
:
"storage.type.rust"
,
"match"
:
"
\\
bfor
\\
b"
},
{
"include"
:
"#type"
}
]
},
{
"include"
:
"#block_doc_comment"
},
...
...
@@ -403,16 +463,34 @@
},
{
"comment"
:
"Function call"
,
"match"
:
"
\\
b([
a-zA-Z_][a-zA-Z0-9_]*
)
\\
s*
\\
("
,
"match"
:
"
\\
b([
A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+
)
\\
s*
\\
("
,
"captures"
:
{
"1"
:
{
"name"
:
"entity.name.function.rust"
}
}
},
{
"comment"
:
"Function call with type parameters"
,
"begin"
:
"
\\
b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)
\\
s*(::)(?=
\\
s*<.*>
\\
s*
\\
()"
,
"end"
:
"
\\
("
,
"captures"
:
{
"1"
:
{
"name"
:
"entity.name.function.rust"
},
"2"
:
{
"name"
:
"keyword.operator.misc.rust"
}
},
"patterns"
:
[
{
"include"
:
"#type_params"
}
]
},
{
"comment"
:
"Function definition"
,
"begin"
:
"
\\
b(fn)
\\
s+([
a-zA-Z_][a-zA-Z0-9_]*
)"
,
"begin"
:
"
\\
b(fn)
\\
s+([
A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+
)"
,
"end"
:
"[
\\
{;]"
,
"beginCaptures"
:
{
"1"
:
{
...
...
@@ -470,7 +548,7 @@
},
{
"comment"
:
"Function arguments"
,
"match"
:
"
fn
"
,
"match"
:
"
\b
fn
\b
"
,
"name"
:
"keyword.other.fn.rust"
}
]
...
...
@@ -564,59 +642,7 @@
"include"
:
"#type_params"
}
]
},
{
"comment"
:
"Implementation"
,
"begin"
:
"
\\
b(impl)
\\
b"
,
"end"
:
"
\\
{"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.type.rust"
}
},
"patterns"
:
[
{
"include"
:
"#block_comment"
},
{
"include"
:
"#line_comment"
},
{
"include"
:
"#sigils"
},
{
"include"
:
"#mut"
},
{
"include"
:
"#ref_lifetime"
},
{
"include"
:
"#core_types"
},
{
"include"
:
"#core_marker"
},
{
"include"
:
"#core_traits"
},
{
"include"
:
"#std_types"
},
{
"include"
:
"#std_traits"
},
{
"include"
:
"#type_params"
},
{
"include"
:
"#where"
},
{
"name"
:
"storage.type.rust"
,
"match"
:
"
\\
bfor
\\
b"
}
]
}
],
"version"
:
"https://github.com/zargony/atom-language-rust/commit/
5e32388ed873683f3ccdea618c25d1ace8759608
"
"version"
:
"https://github.com/zargony/atom-language-rust/commit/
c24ef01b9f989f1262c9e70fe13b314b8e646ed0
"
}
\ No newline at end of file
extensions/rust/test/colorize-results/test-6611_rs.json
浏览文件 @
6b48d583
...
...
@@ -11,7 +11,7 @@
}
},
{
"c"
:
"
Foo
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -21,6 +21,17 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"Foo"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"<A,B>"
,
"t"
:
"source.rust meta.type_params.rust"
,
...
...
@@ -55,7 +66,7 @@
}
},
{
"c"
:
"
A: B
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -65,6 +76,39 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"A"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
": "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
"light_plus"
:
"default: #000000"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"B"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"{ }"
,
"t"
:
"source.rust"
,
...
...
@@ -88,7 +132,7 @@
}
},
{
"c"
:
"
Foo
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -98,6 +142,17 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"Foo"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"<A,B>"
,
"t"
:
"source.rust meta.type_params.rust"
,
...
...
@@ -132,7 +187,7 @@
}
},
{
"c"
:
"
C
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -142,6 +197,17 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"C"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
" "
,
"t"
:
"source.rust"
,
...
...
@@ -165,7 +231,7 @@
}
},
{
"c"
:
"
A: B
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -175,6 +241,39 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"A"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
": "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
"light_plus"
:
"default: #000000"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"B"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"{ }"
,
"t"
:
"source.rust"
,
...
...
@@ -198,7 +297,7 @@
}
},
{
"c"
:
"
Foo
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -208,6 +307,17 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"Foo"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"<A,B>"
,
"t"
:
"source.rust meta.type_params.rust"
,
...
...
@@ -242,7 +352,7 @@
}
},
{
"c"
:
"
C
"
,
"c"
:
" "
,
"t"
:
"source.rust"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
...
...
@@ -252,6 +362,17 @@
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"C"
,
"t"
:
"source.rust entity.name.type.rust"
,
"r"
:
{
"dark_plus"
:
"entity.name.type: #4EC9B0"
,
"light_plus"
:
"entity.name.type: #267F99"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"entity.name.type: #4EC9B0"
}
},
{
"c"
:
"{"
,
"t"
:
"source.rust"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录