Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
旅途_2012
vscode
提交
d17ceea0
V
vscode
项目概览
旅途_2012
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d17ceea0
编写于
7月 09, 2018
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update to powershell grammars. Fixes #52956
上级
2f041f0a
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
471 addition
and
253 deletion
+471
-253
extensions/powershell/syntaxes/powershell.tmLanguage.json
extensions/powershell/syntaxes/powershell.tmLanguage.json
+126
-84
extensions/powershell/test/colorize-results/test_ps1.json
extensions/powershell/test/colorize-results/test_ps1.json
+345
-169
未找到文件。
extensions/powershell/syntaxes/powershell.tmLanguage.json
浏览文件 @
d17ceea0
...
...
@@ -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/PowerShell/EditorSyntax/commit/
6f5438611c54922ea94c81532a2dcfee72190039
"
,
"version"
:
"https://github.com/PowerShell/EditorSyntax/commit/
146e421358945dbfbd24a9dcf56d759bdb0693db
"
,
"name"
:
"PowerShell"
,
"scopeName"
:
"source.powershell"
,
"patterns"
:
[
...
...
@@ -71,7 +71,17 @@
},
{
"begin"
:
"(?<!')'"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.begin.powershell"
}
},
"end"
:
"'(?!')"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.end.powershell"
}
},
"name"
:
"string.quoted.single.powershell"
,
"patterns"
:
[
{
...
...
@@ -137,7 +147,7 @@
"begin"
:
"(
\\
$)(
\\
()"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"punctuation.section.group.begin.powershell"
...
...
@@ -170,8 +180,20 @@
"name"
:
"keyword.control.powershell"
},
{
"match"
:
"(?<!
\\
w)(--%)(?!
\\
w)"
,
"name"
:
"keyword.control.powershell"
"begin"
:
"(?<!
\\
w)(--%)(?!
\\
w)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"keyword.control.powershell"
}
},
"end"
:
"$"
,
"patterns"
:
[
{
"match"
:
".+"
,
"name"
:
"string.unquoted.powershell"
}
],
"comment"
:
"This should be moved to the repository at some point."
},
{
"comment"
:
"This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix."
,
...
...
@@ -220,7 +242,7 @@
},
{
"match"
:
"
\\
|{2}|&{2}|;"
,
"name"
:
"
keyword.other.statement-separator
.powershell"
"name"
:
"
punctuation.terminator.statement
.powershell"
},
{
"match"
:
"&|(?<!
\\
w)
\\
.(?= )|`|,|
\\
|"
,
...
...
@@ -326,7 +348,17 @@
},
{
"begin"
:
"(?<!')'"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.begin.powershell"
}
},
"end"
:
"'(?!')"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.end.powershell"
}
},
"name"
:
"string.quoted.single.powershell"
,
"patterns"
:
[
{
...
...
@@ -379,7 +411,7 @@
"name"
:
"keyword.operator.documentation.powershell"
}
},
"match"
:
"
(?i:
\\
s*
(
\\
.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))"
,
"match"
:
"
^(?i:(?:
\\
s*|#)+
(
\\
.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))"
,
"name"
:
"comment.documentation.embedded.powershell"
},
{
...
...
@@ -464,7 +496,7 @@
"begin"
:
"(
\\
$)(
\\
()"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"punctuation.section.group.begin.powershell"
...
...
@@ -617,11 +649,11 @@
"patterns"
:
[
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"constant.language.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
}
},
"comment"
:
"These are special constants."
,
...
...
@@ -629,14 +661,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"support.constant.variable.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"These are the other built-in constants."
,
...
...
@@ -644,14 +676,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"support.constant.automatic.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant."
,
...
...
@@ -659,14 +691,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"variable.language.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"Style preference variables as language variables so that they stand out."
,
...
...
@@ -674,25 +706,28 @@
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"storage.modifier.scope.powershell"
},
"3"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"4"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$|@)(global|local|private|script|using|workflow):((?:
\\
p{L}|
\\
d|_)+))((?:
\\
.(?:
\\
p{L}|
\\
d|_)+)*
\\
b)?"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"punctuation.section.braces.begin.powershell"
...
...
@@ -700,39 +735,39 @@
"3"
:
{
"name"
:
"storage.modifier.scope.powershell"
},
"4"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"5"
:
{
"name"
:
"punctuation.section.braces.end.powershell"
},
"6"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$)(
\\
{)(global|local|private|script|using|workflow):([^}]*[^}`])(
\\
}))((?:
\\
.(?:
\\
p{L}|
\\
d|_)+)*
\\
b)?"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"support.variable.drive.powershell"
},
"3"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"4"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$|@)((?:
\\
p{L}|
\\
d|_)+:)?((?:
\\
p{L}|
\\
d|_)+))((?:
\\
.(?:
\\
p{L}|
\\
d|_)+)*
\\
b)?"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"punctuation.section.braces.begin.powershell"
...
...
@@ -740,14 +775,11 @@
"3"
:
{
"name"
:
"support.variable.drive.powershell"
},
"4"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"5"
:
{
"name"
:
"punctuation.section.braces.end.powershell"
},
"6"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$)(
\\
{)((?:
\\
p{L}|
\\
d|_)+:)?([^}]*[^}`])(
\\
}))((?:
\\
.(?:
\\
p{L}|
\\
d|_)+)*
\\
b)?"
...
...
@@ -795,11 +827,11 @@
"patterns"
:
[
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"constant.language.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
}
},
"comment"
:
"These are special constants."
,
...
...
@@ -807,14 +839,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"support.constant.variable.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"These are the other built-in constants."
,
...
...
@@ -822,14 +854,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"support.variable.automatic.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"Automatic variables are not constants, but they are read-only..."
,
...
...
@@ -837,14 +869,14 @@
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.other.variable.definition.powershell"
},
"2"
:
{
"0"
:
{
"name"
:
"variable.language.powershell"
},
"1"
:
{
"name"
:
"punctuation.definition.variable.powershell"
},
"3"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"comment"
:
"Style preference variables as language variables so that they stand out."
,
...
...
@@ -852,62 +884,65 @@
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"storage.modifier.scope.powershell"
},
"3"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"4"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$|@)(global|local|private|script|using|workflow):((?:
\\
p{L}|
\\
d|_)+))"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"storage.modifier.scope.powershell"
},
"3"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"4"
:
{
"name"
:
"keyword.other.powershell"
},
"5"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$)(
\\
{)(global|local|private|script|using|workflow):([^}]*[^}`])(
\\
}))"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"support.variable.drive.powershell"
},
"3"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"4"
:
{
"name"
:
"
entity.name.function.invocation
.powershell"
"name"
:
"
variable.other.member
.powershell"
}
},
"match"
:
"(?i:(
\\
$)((?:
\\
p{L}|
\\
d|_)+:)?((?:
\\
p{L}|
\\
d|_)+))"
},
{
"captures"
:
{
"0"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"1"
:
{
"name"
:
"
keyword.other.variable.definition
.powershell"
"name"
:
"
punctuation.definition.variable
.powershell"
},
"2"
:
{
"name"
:
"punctuation.section.braces.begin"
...
...
@@ -915,9 +950,6 @@
"3"
:
{
"name"
:
"support.variable.drive.powershell"
},
"4"
:
{
"name"
:
"variable.other.readwrite.powershell"
},
"5"
:
{
"name"
:
"punctuation.section.braces.end"
}
...
...
@@ -972,7 +1004,17 @@
},
"doubleQuotedString"
:
{
"begin"
:
"(?<!(?<!`)
\"
)
\"
"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.begin.powershell"
}
},
"end"
:
"
\"
(?!
\"
)"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.string.end.powershell"
}
},
"name"
:
"string.quoted.double.powershell"
,
"patterns"
:
[
{
...
...
extensions/powershell/test/colorize-results/test_ps1.json
浏览文件 @
d17ceea0
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录