Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
145310ae
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,体验更适合开发者的 AI 搜索 >>
提交
145310ae
编写于
5月 25, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[lua] update grammar
上级
84ced612
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
123 addition
and
57 deletion
+123
-57
extensions/lua/syntaxes/lua.json
extensions/lua/syntaxes/lua.json
+118
-30
extensions/lua/test/colorize-results/test_lua.json
extensions/lua/test/colorize-results/test_lua.json
+5
-27
未找到文件。
extensions/lua/syntaxes/lua.json
浏览文件 @
145310ae
{
"comment"
:
"Lua Syntax: version 0.8"
,
"fileTypes"
:
[
"lua"
"lua"
,
"p8"
,
"rockspec"
,
"luacheckrc"
,
"lakefile"
],
"firstLineMatch"
:
"
\\
A#!.*?
\\
blua
\\
b
"
,
"firstLineMatch"
:
"
\\
A#!.*?
\\
blua
(
\\
d+(
\\
.
\\
d+)?)?
\\
b|
\\
A--
\\
s+-
\\
*-
\\
s*lua
\\
s*-
\\
*-
"
,
"keyEquivalent"
:
"^~L"
,
"name"
:
"Lua"
,
"patterns"
:
[
{
"captures"
:
{
"begin"
:
"
\\
b((local
\\
b)
\\
s+)?(function)
\\
s*(
\\
s+[a-zA-Z_][a-zA-Z0-9_]*(
\\
.[a-zA-Z_][a-zA-Z0-9_]*)*(:[a-zA-Z_][a-zA-Z0-9_]*)?
\\
s*)?(
\\
()"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"keyword.control.lua"
},
"2"
:
{
"name"
:
"entity.name.function.scope.lua"
"name"
:
"storage.modifier.local.lua"
},
"3"
:
{
"name"
:
"
entity.name.function
.lua"
"name"
:
"
keyword.control
.lua"
},
"4"
:
{
"name"
:
"
punctuation.definition.parameters.begi
n.lua"
"name"
:
"
entity.name.functio
n.lua"
},
"5"
:
{
"name"
:
"variable.parameter.function.lua"
},
"6"
:
{
"name"
:
"punctuation.definition.parameters.begin.lua"
}
},
"end"
:
"
\\
)"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.parameters.end.lua"
}
},
"match"
:
"
\\
b(function)(?:
\\
s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]
\\
w*)
\\
s*)?(
\\
()([^)]*)(
\\
))"
,
"name"
:
"meta.function.lua"
"name"
:
"meta.function.lua"
,
"patterns"
:
[
{
"match"
:
"[a-zA-Z_][a-zA-Z0-9_]*"
,
"name"
:
"variable.parameter.function.lua"
}
]
},
{
"match"
:
"(?<![
\\
w
\\
d.])0[xX]
\\
h+(?![pPeE.0-9])"
,
"name"
:
"constant.numeric.integer.hexadecimal.lua"
},
{
"match"
:
"(?<![
\\
w
\\
d.])0[xX]
\\
h+(
\\
.
\\
h+)?([eE]-?
\\
d*)?([pP][-+]
\\
d+)?"
,
"name"
:
"constant.numeric.float.hexadecimal.lua"
},
{
"match"
:
"(?<![
\\
d.])
\\
s0x[a-fA-F
\\
d]+|
\\
b
\\
d+(
\\
.
\\
d+)?([eE]-?
\\
d+)?|
\\
.
\\
d+([eE]-?
\\
d+)?"
,
"name"
:
"constant.numeric.lua"
"match"
:
"(?<![
\\
w
\\
d.])
\\
d+(?![pPeE.0-9])"
,
"name"
:
"constant.numeric.integer.lua"
},
{
"match"
:
"(?<![
\\
w
\\
d.])
\\
d+(
\\
.
\\
d+)?([eE]-?
\\
d*)?"
,
"name"
:
"constant.numeric.float.lua"
},
{
"begin"
:
"'"
,
...
...
@@ -51,8 +73,7 @@
"name"
:
"string.quoted.single.lua"
,
"patterns"
:
[
{
"match"
:
"
\\\\
."
,
"name"
:
"constant.character.escape.lua"
"include"
:
"#escaped_char"
}
]
},
...
...
@@ -72,8 +93,7 @@
"name"
:
"string.quoted.double.lua"
,
"patterns"
:
[
{
"match"
:
"
\\\\
."
,
"name"
:
"constant.character.escape.lua"
"include"
:
"#escaped_char"
}
]
},
...
...
@@ -119,24 +139,43 @@
"name"
:
"string.quoted.other.multiline.lua"
},
{
"begin"
:
"--
\\
[(=*)
\\
["
,
"captures"
:
{
"
0
"
:
{
"
1
"
:
{
"name"
:
"punctuation.definition.comment.lua"
}
},
"
end"
:
"
\\
]
\\
1
\\
]
"
,
"name"
:
"comment.
block
.lua"
"
match"
:
"
\\
A(#!).*$
\\
n?
"
,
"name"
:
"comment.
line.shebang
.lua"
},
{
"begin"
:
"(^[
\\
t]+)?(?=--
(?!
\\
[
\\
[)
)"
,
"begin"
:
"(^[
\\
t]+)?(?=--)"
,
"beginCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.whitespace.comment.leading.lua"
}
},
"end"
:
"(?!
\\
G)"
,
"end"
:
"(?!
\\
G)((?!^)[
\\
t]+
\\
n)?"
,
"endCaptures"
:
{
"1"
:
{
"name"
:
"punctuation.whitespace.comment.trailing.lua"
}
},
"patterns"
:
[
{
"begin"
:
"--
\\
[(=*)
\\
["
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.begin.lua"
}
},
"end"
:
"
\\
]
\\
1
\\
]"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.end.lua"
}
},
"name"
:
"comment.block.lua"
},
{
"begin"
:
"--"
,
"beginCaptures"
:
{
...
...
@@ -149,6 +188,29 @@
}
]
},
{
"captures"
:
{
"1"
:
{
"name"
:
"keyword.control.goto.lua"
},
"2"
:
{
"name"
:
"constant.other.placeholder.lua"
}
},
"match"
:
"
\\
b(goto)
\\
s+([a-zA-Z_][a-zA-Z0-9_]*)"
},
{
"captures"
:
{
"1"
:
{
"name"
:
"punctuation.definition.label.begin.lua"
},
"2"
:
{
"name"
:
"punctuation.definition.label.end.lua"
}
},
"match"
:
"(::)[a-zA-Z_][a-zA-Z0-9_]*(::)"
,
"name"
:
"constant.other.placeholder.lua"
},
{
"match"
:
"
\\
b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local|in)
\\
b"
,
"name"
:
"keyword.control.lua"
...
...
@@ -174,11 +236,11 @@
"name"
:
"keyword.operator.lua"
},
{
"match"
:
"
\\
b([
A-Za-z_]
\\
w
*)
\\
b(?=
\\
s*(?:[({
\"
']|
\\
[
\\
[))"
,
"match"
:
"
\\
b([
a-zA-Z_][a-zA-Z0-9_]
*)
\\
b(?=
\\
s*(?:[({
\"
']|
\\
[
\\
[))"
,
"name"
:
"support.function.any-method.lua"
},
{
"match"
:
"(?<=[^.]
\\
.|:)
\\
b([
A-Za-z_]
\\
w
*)"
,
"match"
:
"(?<=[^.]
\\
.|:)
\\
b([
a-zA-Z_][a-zA-Z0-9_]
*)"
,
"name"
:
"variable.other.lua"
},
{
...
...
@@ -186,7 +248,33 @@
"name"
:
"keyword.operator.lua"
}
],
"repository"
:
{
"escaped_char"
:
{
"patterns"
:
[
{
"match"
:
"
\\\\
[abfnrtvz
\\\\\"
'
\\
n]"
,
"name"
:
"constant.character.escape.lua"
},
{
"match"
:
"
\\\\\\
d{1,3}"
,
"name"
:
"constant.character.escape.byte.lua"
},
{
"match"
:
"
\\\\
x
\\
h
\\
h"
,
"name"
:
"constant.character.escape.byte.lua"
},
{
"match"
:
"
\\\\
u
\\
{
\\
h+
\\
}"
,
"name"
:
"constant.character.escape.unicode.lua"
},
{
"match"
:
"
\\\\
."
,
"name"
:
"invalid.illegal.character.escape.lua"
}
]
}
},
"scopeName"
:
"source.lua"
,
"uuid"
:
"93E017CC-6F27-11D9-90EB-000D93589AF7"
,
"version"
:
"https://github.com/textmate/lua.tmbundle/commit/
609fe340f40b31f4189dabbb38f885b58cf0dd26
"
}
"version"
:
"https://github.com/textmate/lua.tmbundle/commit/
3a97f1b46804a3de99d4d2909e14450299462f2d
"
}
\ No newline at end of file
extensions/lua/test/colorize-results/test_lua.json
浏览文件 @
145310ae
...
...
@@ -55,18 +55,7 @@
}
},
{
"c"
:
" "
,
"t"
:
"source.lua meta.function.lua"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
"light_plus"
:
"default: #000000"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"fact"
,
"c"
:
" fact "
,
"t"
:
"source.lua meta.function.lua entity.name.function.lua"
,
"r"
:
{
"dark_plus"
:
"entity.name.function: #DCDCAA"
,
...
...
@@ -76,20 +65,9 @@
"hc_black"
:
"entity.name.function: #DCDCAA"
}
},
{
"c"
:
" "
,
"t"
:
"source.lua meta.function.lua"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
"light_plus"
:
"default: #000000"
,
"dark_vs"
:
"default: #D4D4D4"
,
"light_vs"
:
"default: #000000"
,
"hc_black"
:
"default: #FFFFFF"
}
},
{
"c"
:
"("
,
"t"
:
"source.lua meta.function.lua
punctuation.definition.parameters.begin.lua
"
,
"t"
:
"source.lua meta.function.lua"
,
"r"
:
{
"dark_plus"
:
"default: #D4D4D4"
,
"light_plus"
:
"default: #000000"
,
...
...
@@ -177,7 +155,7 @@
},
{
"c"
:
"0"
,
"t"
:
"source.lua constant.numeric.lua"
,
"t"
:
"source.lua constant.numeric.
integer.
lua"
,
"r"
:
{
"dark_plus"
:
"constant.numeric: #B5CEA8"
,
"light_plus"
:
"constant.numeric: #09885A"
,
...
...
@@ -243,7 +221,7 @@
},
{
"c"
:
"1"
,
"t"
:
"source.lua constant.numeric.lua"
,
"t"
:
"source.lua constant.numeric.
integer.
lua"
,
"r"
:
{
"dark_plus"
:
"constant.numeric: #B5CEA8"
,
"light_plus"
:
"constant.numeric: #09885A"
,
...
...
@@ -364,7 +342,7 @@
},
{
"c"
:
"1"
,
"t"
:
"source.lua constant.numeric.lua"
,
"t"
:
"source.lua constant.numeric.
integer.
lua"
,
"r"
:
{
"dark_plus"
:
"constant.numeric: #B5CEA8"
,
"light_plus"
:
"constant.numeric: #09885A"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录