Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
da45ae99
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
da45ae99
编写于
5月 25, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[typescript] update grammar
上级
1913a5ce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
330 addition
and
225 deletion
+330
-225
extensions/javascript/syntaxes/JavaScript.tmLanguage.json
extensions/javascript/syntaxes/JavaScript.tmLanguage.json
+108
-73
extensions/javascript/test/colorize-results/test_jsx.json
extensions/javascript/test/colorize-results/test_jsx.json
+5
-5
extensions/typescript/syntaxes/TypeScript.tmLanguage.json
extensions/typescript/syntaxes/TypeScript.tmLanguage.json
+109
-74
extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json
...sions/typescript/syntaxes/TypeScriptReact.tmLanguage.json
+108
-73
未找到文件。
extensions/javascript/syntaxes/JavaScript.tmLanguage.json
浏览文件 @
da45ae99
...
...
@@ -74,7 +74,7 @@
"name"
:
"storage.type.js"
}
},
"end"
:
"(?=$|;|}|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
;|}|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#destructuring-variable"
...
...
@@ -103,7 +103,7 @@
"name"
:
"meta.definition.variable.js entity.name.function.js"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -118,7 +118,7 @@
"name"
:
"meta.definition.variable.js variable.other.constant.js"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -133,7 +133,7 @@
"name"
:
"meta.definition.variable.js variable.other.readwrite.js"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -160,7 +160,7 @@
{
"name"
:
"meta.object-binding-pattern-variable.js"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#object-binding-pattern"
...
...
@@ -176,7 +176,7 @@
{
"name"
:
"meta.array-binding-pattern-variable.js"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
[)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#array-binding-pattern"
...
...
@@ -1141,14 +1141,14 @@
"name"
:
"storage.modifier.js"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"end"
:
"(?=
\\
}|;|,|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#variable-initializer"
},
{
"begin"
:
"(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:
\\
'[^']*
\\
')|(?:
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:))"
,
"end"
:
"(?=[};,=]|$)|(?<=
\\
})"
,
"end"
:
"(?=[};,=]|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#type-annotation"
...
...
@@ -1179,50 +1179,93 @@
]
},
"method-declaration"
:
{
"name"
:
"meta.method.declaration.js"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.js"
},
"2"
:
{
"name"
:
"storage.modifier.js"
},
"3"
:
{
"name"
:
"storage.modifier.async.js"
},
"4"
:
{
"name"
:
"storage.type.property.js"
},
"5"
:
{
"name"
:
"keyword.operator.new.js"
},
"6"
:
{
"name"
:
"storage.type.js"
},
"7"
:
{
"name"
:
"keyword.generator.asterisk.js"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
"name"
:
"meta.method.declaration.js"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.js"
},
"2"
:
{
"name"
:
"storage.modifier.js"
},
"3"
:
{
"name"
:
"storage.modifier.async.js"
},
"4"
:
{
"name"
:
"storage.type.property.js"
},
"5"
:
{
"name"
:
"keyword.generator.asterisk.js"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
},
{
"include"
:
"#decl-block"
"name"
:
"meta.method.declaration.js"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.js"
},
"2"
:
{
"name"
:
"storage.modifier.js"
},
"3"
:
{
"name"
:
"storage.modifier.async.js"
},
"4"
:
{
"name"
:
"keyword.operator.new.js"
},
"5"
:
{
"name"
:
"storage.type.js"
},
"6"
:
{
"name"
:
"keyword.generator.asterisk.js"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
}
]
},
...
...
@@ -1248,7 +1291,7 @@
},
"object-literal-method-declaration"
:
{
"name"
:
"meta.method.declaration.js"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.js"
...
...
@@ -1286,7 +1329,7 @@
]
},
"object-literal-method-overload-declaration"
:
{
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.js"
...
...
@@ -1386,7 +1429,7 @@
"name"
:
"meta.definition.function.js entity.name.function.js"
}
},
"end"
:
"(?=$|;)|(?<=
\\
})"
,
"end"
:
"(?=$|
^|
;)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1710,7 +1753,7 @@
"name"
:
"keyword.operator.type.annotation.js"
}
},
"end"
:
"(?<![:|&])(
(?=$)|(?=[{};,]|//)
)"
,
"end"
:
"(?<![:|&])(
?=$|^|[{};,]|//
)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1744,7 +1787,7 @@
"name"
:
"keyword.operator.type.annotation.js"
}
},
"end"
:
"(?=$|[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|
^|
[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -2019,7 +2062,7 @@
"name"
:
"punctuation.definition.typeparameters.begin.js"
}
},
"end"
:
"(
?=$)|(
>)"
,
"end"
:
"(>)"
,
"endCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.definition.typeparameters.end.js"
...
...
@@ -2054,7 +2097,7 @@
"name"
:
"keyword.operator.assignment.js"
}
},
"end"
:
"(?=$|[,);}
\\
]])"
,
"end"
:
"(?=$|
^|
[,);}
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#expression"
...
...
@@ -2693,7 +2736,7 @@
"name"
:
"keyword.control.as.js"
}
},
"end"
:
"(?=$|[;,:})
\\
]])"
,
"end"
:
"(?=$|
^|
[;,:})
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#type"
...
...
@@ -2778,7 +2821,7 @@
},
{
"name"
:
"meta.arrow.js"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
!
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.js"
...
...
@@ -3358,25 +3401,17 @@
}
},
{
"begin"
:
"(^[
\\
t]+)?(
?=
//)"
,
"begin"
:
"(^[
\\
t]+)?(//)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.whitespace.comment.leading.js"
},
"2"
:
{
"name"
:
"comment.line.double-slash.js punctuation.definition.comment.js"
}
},
"end"
:
"(?=$)"
,
"patterns"
:
[
{
"name"
:
"comment.line.double-slash.js"
,
"begin"
:
"//"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.js"
}
},
"end"
:
"(?=$)"
}
]
"end"
:
"(?=^)"
,
"contentName"
:
"comment.line.double-slash.tsx"
}
]
},
...
...
@@ -3388,7 +3423,7 @@
"name"
:
"punctuation.definition.comment.js"
}
},
"end"
:
"(?=
$
)"
,
"end"
:
"(?=
^
)"
,
"patterns"
:
[
{
"name"
:
"meta.tag.js"
,
...
...
@@ -4188,5 +4223,5 @@
]
}
},
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
cb1af7953db224204607cbe22d3a45aa0f77a4c1
"
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
8c967fe7553297bfad672b7417d78e357c8fe724
"
}
\ No newline at end of file
extensions/javascript/test/colorize-results/test_jsx.json
浏览文件 @
da45ae99
...
...
@@ -529,7 +529,7 @@
},
{
"c"
:
" Prevent following the link."
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
js
"
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
tsx
"
,
"r"
:
{
"dark_plus"
:
"comment: #608B4E"
,
"light_plus"
:
"comment: #008000"
,
...
...
@@ -628,7 +628,7 @@
},
{
"c"
:
" Invert the chosen default."
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
js
"
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
tsx
"
,
"r"
:
{
"dark_plus"
:
"comment: #608B4E"
,
"light_plus"
:
"comment: #008000"
,
...
...
@@ -661,7 +661,7 @@
},
{
"c"
:
" This will trigger an intelligent re-render of the component."
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
js
"
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
tsx
"
,
"r"
:
{
"dark_plus"
:
"comment: #608B4E"
,
"light_plus"
:
"comment: #008000"
,
...
...
@@ -1046,7 +1046,7 @@
},
{
"c"
:
" Default to the default message."
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
js
"
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
tsx
"
,
"r"
:
{
"dark_plus"
:
"comment: #608B4E"
,
"light_plus"
:
"comment: #008000"
,
...
...
@@ -1222,7 +1222,7 @@
},
{
"c"
:
" If toggled, show the alternate message."
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
js
"
,
"t"
:
"source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.
tsx
"
,
"r"
:
{
"dark_plus"
:
"comment: #608B4E"
,
"light_plus"
:
"comment: #008000"
,
...
...
extensions/typescript/syntaxes/TypeScript.tmLanguage.json
浏览文件 @
da45ae99
...
...
@@ -71,7 +71,7 @@
"name"
:
"storage.type.ts"
}
},
"end"
:
"(?=$|;|}|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
;|}|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#destructuring-variable"
...
...
@@ -100,7 +100,7 @@
"name"
:
"meta.definition.variable.ts entity.name.function.ts"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -115,7 +115,7 @@
"name"
:
"meta.definition.variable.ts variable.other.constant.ts"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -130,7 +130,7 @@
"name"
:
"meta.definition.variable.ts variable.other.readwrite.ts"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -157,7 +157,7 @@
{
"name"
:
"meta.object-binding-pattern-variable.ts"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#object-binding-pattern"
...
...
@@ -173,7 +173,7 @@
{
"name"
:
"meta.array-binding-pattern-variable.ts"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
[)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#array-binding-pattern"
...
...
@@ -1135,14 +1135,14 @@
"name"
:
"storage.modifier.ts"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"end"
:
"(?=
\\
}|;|,|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#variable-initializer"
},
{
"begin"
:
"(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:
\\
'[^']*
\\
')|(?:
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:))"
,
"end"
:
"(?=[};,=]|$)|(?<=
\\
})"
,
"end"
:
"(?=[};,=]|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#type-annotation"
...
...
@@ -1173,50 +1173,93 @@
]
},
"method-declaration"
:
{
"name"
:
"meta.method.declaration.ts"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.ts"
},
"2"
:
{
"name"
:
"storage.modifier.ts"
},
"3"
:
{
"name"
:
"storage.modifier.async.ts"
},
"4"
:
{
"name"
:
"storage.type.property.ts"
},
"5"
:
{
"name"
:
"keyword.operator.new.ts"
},
"6"
:
{
"name"
:
"storage.type.ts"
},
"7"
:
{
"name"
:
"keyword.generator.asterisk.ts"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
"name"
:
"meta.method.declaration.ts"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.ts"
},
"2"
:
{
"name"
:
"storage.modifier.ts"
},
"3"
:
{
"name"
:
"storage.modifier.async.ts"
},
"4"
:
{
"name"
:
"storage.type.property.ts"
},
"5"
:
{
"name"
:
"keyword.generator.asterisk.ts"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
},
{
"include"
:
"#decl-block"
"name"
:
"meta.method.declaration.ts"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.ts"
},
"2"
:
{
"name"
:
"storage.modifier.ts"
},
"3"
:
{
"name"
:
"storage.modifier.async.ts"
},
"4"
:
{
"name"
:
"keyword.operator.new.ts"
},
"5"
:
{
"name"
:
"storage.type.ts"
},
"6"
:
{
"name"
:
"keyword.generator.asterisk.ts"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
}
]
},
...
...
@@ -1242,7 +1285,7 @@
},
"object-literal-method-declaration"
:
{
"name"
:
"meta.method.declaration.ts"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.ts"
...
...
@@ -1280,7 +1323,7 @@
]
},
"object-literal-method-overload-declaration"
:
{
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.ts"
...
...
@@ -1380,7 +1423,7 @@
"name"
:
"meta.definition.function.ts entity.name.function.ts"
}
},
"end"
:
"(?=$|;)|(?<=
\\
})"
,
"end"
:
"(?=$|
^|
;)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1704,7 +1747,7 @@
"name"
:
"keyword.operator.type.annotation.ts"
}
},
"end"
:
"(?<![:|&])(
(?=$)|(?=[{};,]|//)
)"
,
"end"
:
"(?<![:|&])(
?=$|^|[{};,]|//
)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1738,7 +1781,7 @@
"name"
:
"keyword.operator.type.annotation.ts"
}
},
"end"
:
"(?=$|[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|
^|
[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -2013,7 +2056,7 @@
"name"
:
"punctuation.definition.typeparameters.begin.ts"
}
},
"end"
:
"(
?=$)|(
>)"
,
"end"
:
"(>)"
,
"endCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.definition.typeparameters.end.ts"
...
...
@@ -2048,7 +2091,7 @@
"name"
:
"keyword.operator.assignment.ts"
}
},
"end"
:
"(?=$|[,);}
\\
]])"
,
"end"
:
"(?=$|
^|
[,);}
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#expression"
...
...
@@ -2487,7 +2530,7 @@
"patterns"
:
[
{
"name"
:
"cast.expr.ts"
,
"begin"
:
"(?:(?<=return|throw|yield|await|default|[=(,:>*]))
\\
s*(<)(?!<?
\\
=)"
,
"begin"
:
"(?:(?<=return|throw|yield|await|default|[=(,:>*
?
]))
\\
s*(<)(?!<?
\\
=)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"meta.brace.angle.ts"
...
...
@@ -2724,7 +2767,7 @@
"name"
:
"keyword.control.as.ts"
}
},
"end"
:
"(?=$|[;,:})
\\
]])"
,
"end"
:
"(?=$|
^|
[;,:})
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#type"
...
...
@@ -2809,7 +2852,7 @@
},
{
"name"
:
"meta.arrow.ts"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
!
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.ts"
...
...
@@ -3389,25 +3432,17 @@
}
},
{
"begin"
:
"(^[
\\
t]+)?(
?=
//)"
,
"begin"
:
"(^[
\\
t]+)?(//)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.whitespace.comment.leading.ts"
},
"2"
:
{
"name"
:
"comment.line.double-slash.ts punctuation.definition.comment.ts"
}
},
"end"
:
"(?=$)"
,
"patterns"
:
[
{
"name"
:
"comment.line.double-slash.ts"
,
"begin"
:
"//"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.ts"
}
},
"end"
:
"(?=$)"
}
]
"end"
:
"(?=^)"
,
"contentName"
:
"comment.line.double-slash.ts"
}
]
},
...
...
@@ -3419,7 +3454,7 @@
"name"
:
"punctuation.definition.comment.ts"
}
},
"end"
:
"(?=
$
)"
,
"end"
:
"(?=
^
)"
,
"patterns"
:
[
{
"name"
:
"meta.tag.ts"
,
...
...
@@ -3923,5 +3958,5 @@
]
}
},
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
9f6676aa2ddb75cb5a9dbe1f59024069e839d986
"
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
8c967fe7553297bfad672b7417d78e357c8fe724
"
}
\ No newline at end of file
extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json
浏览文件 @
da45ae99
...
...
@@ -71,7 +71,7 @@
"name"
:
"storage.type.tsx"
}
},
"end"
:
"(?=$|;|}|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
;|}|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#destructuring-variable"
...
...
@@ -100,7 +100,7 @@
"name"
:
"meta.definition.variable.tsx entity.name.function.tsx"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -115,7 +115,7 @@
"name"
:
"meta.definition.variable.tsx variable.other.constant.tsx"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -130,7 +130,7 @@
"name"
:
"meta.definition.variable.tsx variable.other.readwrite.tsx"
}
},
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#var-single-variable-type-annotation"
...
...
@@ -157,7 +157,7 @@
{
"name"
:
"meta.object-binding-pattern-variable.tsx"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#object-binding-pattern"
...
...
@@ -173,7 +173,7 @@
{
"name"
:
"meta.array-binding-pattern-variable.tsx"
,
"begin"
:
"(?<!=|:|of|in)
\\
s*(?=
\\
[)"
,
"end"
:
"(?=$|[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"end"
:
"(?=$|
^|
[;,=}]|(
\\
s+(of|in)
\\
s+))"
,
"patterns"
:
[
{
"include"
:
"#array-binding-pattern"
...
...
@@ -1138,14 +1138,14 @@
"name"
:
"storage.modifier.tsx"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"end"
:
"(?=
\\
}|;|,|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#variable-initializer"
},
{
"begin"
:
"(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:
\\
'[^']*
\\
')|(?:
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:))"
,
"end"
:
"(?=[};,=]|$)|(?<=
\\
})"
,
"end"
:
"(?=[};,=]|$
|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
?
\\
s*)?(=|:)))
)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#type-annotation"
...
...
@@ -1176,50 +1176,93 @@
]
},
"method-declaration"
:
{
"name"
:
"meta.method.declaration.tsx"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.tsx"
},
"2"
:
{
"name"
:
"storage.modifier.tsx"
},
"3"
:
{
"name"
:
"storage.modifier.async.tsx"
},
"4"
:
{
"name"
:
"storage.type.property.tsx"
},
"5"
:
{
"name"
:
"keyword.operator.new.tsx"
},
"6"
:
{
"name"
:
"storage.type.tsx"
},
"7"
:
{
"name"
:
"keyword.generator.asterisk.tsx"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
"name"
:
"meta.method.declaration.tsx"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.tsx"
},
"2"
:
{
"name"
:
"storage.modifier.tsx"
},
"3"
:
{
"name"
:
"storage.modifier.async.tsx"
},
"4"
:
{
"name"
:
"storage.type.property.tsx"
},
"5"
:
{
"name"
:
"keyword.generator.asterisk.tsx"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
},
{
"include"
:
"#decl-block"
"name"
:
"meta.method.declaration.tsx"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(public|private|protected)
\\
s+)?(?:
\\
b(abstract)
\\
s+)?(?:
\\
b(async)
\\
s+)?(?:(?:
\\
b(?:(new)|(constructor))
\\
b(?!
\\
$|
\\
.|:))|(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))?
\\
s*[
\\
(
\\
<]))"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.tsx"
},
"2"
:
{
"name"
:
"storage.modifier.tsx"
},
"3"
:
{
"name"
:
"storage.modifier.async.tsx"
},
"4"
:
{
"name"
:
"keyword.operator.new.tsx"
},
"5"
:
{
"name"
:
"storage.type.tsx"
},
"6"
:
{
"name"
:
"keyword.generator.asterisk.tsx"
}
},
"end"
:
"(?=
\\
}|;|,|$)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#method-declaration-name"
},
{
"include"
:
"#comment"
},
{
"include"
:
"#type-parameters"
},
{
"include"
:
"#function-parameters"
},
{
"include"
:
"#return-type"
},
{
"include"
:
"#decl-block"
}
]
}
]
},
...
...
@@ -1245,7 +1288,7 @@
},
"object-literal-method-declaration"
:
{
"name"
:
"meta.method.declaration.tsx"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.tsx"
...
...
@@ -1283,7 +1326,7 @@
]
},
"object-literal-method-overload-declaration"
:
{
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
?
\\
s*[
\\
(
\\
<])"
,
"begin"
:
"(?<!
\\
.|
\\
$)(?:
\\
b(async)
\\
s+)?(?:
\\
b(get|set)
\\
s+)?(?:(
\\
*)
\\
s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(
\\
'[^']*
\\
')|(
\\\"
[^
\"
]*
\\\"
)|(
\\
[([^
\\
[
\\
]]|
\\
[[^
\\
[
\\
]]*
\\
])+
\\
]))
\\
s*(
\\
??))
\\
s*[
\\
(
\\
<])"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.tsx"
...
...
@@ -1383,7 +1426,7 @@
"name"
:
"meta.definition.function.tsx entity.name.function.tsx"
}
},
"end"
:
"(?=$|;)|(?<=
\\
})"
,
"end"
:
"(?=$|
^|
;)|(?<=
\\
})"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1707,7 +1750,7 @@
"name"
:
"keyword.operator.type.annotation.tsx"
}
},
"end"
:
"(?<![:|&])(
(?=$)|(?=[{};,]|//)
)"
,
"end"
:
"(?<![:|&])(
?=$|^|[{};,]|//
)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -1741,7 +1784,7 @@
"name"
:
"keyword.operator.type.annotation.tsx"
}
},
"end"
:
"(?=$|[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"end"
:
"(?=$|
^|
[,);
\\
}
\\
]]|//)|(?==[^>])|(?<=[
\\
}>
\\
]
\\
)]|[_$[:alpha:]])
\\
s*(?=
\\
{)"
,
"patterns"
:
[
{
"include"
:
"#comment"
...
...
@@ -2016,7 +2059,7 @@
"name"
:
"punctuation.definition.typeparameters.begin.tsx"
}
},
"end"
:
"(
?=$)|(
>)"
,
"end"
:
"(>)"
,
"endCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.definition.typeparameters.end.tsx"
...
...
@@ -2051,7 +2094,7 @@
"name"
:
"keyword.operator.assignment.tsx"
}
},
"end"
:
"(?=$|[,);}
\\
]])"
,
"end"
:
"(?=$|
^|
[,);}
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#expression"
...
...
@@ -2690,7 +2733,7 @@
"name"
:
"keyword.control.as.tsx"
}
},
"end"
:
"(?=$|[;,:})
\\
]])"
,
"end"
:
"(?=$|
^|
[;,:})
\\
]])"
,
"patterns"
:
[
{
"include"
:
"#type"
...
...
@@ -2775,7 +2818,7 @@
},
{
"name"
:
"meta.arrow.tsx"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"begin"
:
"(?x) (?:
\n
(?<!
\\
.|
\\
$)(
\\
basync)
\n
)? ((?<![})
!
\\
]])
\\
s*
\n
(?=
\n
# sure shot arrow functions even if => is on new line
\n
(
\n
[(]
\\
s*
\n
(
\n
([)]
\\
s*:) | # ():
\n
((
\\
.
\\
.
\\
.
\\
s*)?[_$[:alpha:]][_$[:alnum:]]*
\\
s*:) # [(]param: | [(]...param:
\n
)
\n
) |
\n
(
\n
[<]
\\
s*[_$[:alpha:]][_$[:alnum:]]*
\\
s+extends
\\
s*[^=>] # < typeparam extends
\n
) |
\n
# arrow function possible to detect only with => on same line
\n
(
\n
(<([^<>=]|=[^<]|
\\
<([^=<>]|=[^<])+
\\
>)+>
\\
s*)? # typeparameters
\n
\\
(([^()]|
\\
([^()]*
\\
))*
\\
) # parameteres
\n
(
\\
s*:
\\
s*(.)*)? # return type
\n
\\
s*=> # arrow operator
\n
)
\n
)
\n
)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"storage.modifier.async.tsx"
...
...
@@ -3355,25 +3398,17 @@
}
},
{
"begin"
:
"(^[
\\
t]+)?(
?=
//)"
,
"begin"
:
"(^[
\\
t]+)?(//)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.whitespace.comment.leading.tsx"
},
"2"
:
{
"name"
:
"comment.line.double-slash.tsx punctuation.definition.comment.tsx"
}
},
"end"
:
"(?=$)"
,
"patterns"
:
[
{
"name"
:
"comment.line.double-slash.tsx"
,
"begin"
:
"//"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.tsx"
}
},
"end"
:
"(?=$)"
}
]
"end"
:
"(?=^)"
,
"contentName"
:
"comment.line.double-slash.tsx"
}
]
},
...
...
@@ -3385,7 +3420,7 @@
"name"
:
"punctuation.definition.comment.tsx"
}
},
"end"
:
"(?=
$
)"
,
"end"
:
"(?=
^
)"
,
"patterns"
:
[
{
"name"
:
"meta.tag.tsx"
,
...
...
@@ -4185,5 +4220,5 @@
]
}
},
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
cb1af7953db224204607cbe22d3a45aa0f77a4c1
"
"version"
:
"https://github.com/Microsoft/TypeScript-TmLanguage/commit/
8c967fe7553297bfad672b7417d78e357c8fe724
"
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录