mirror of
https://github.com/Microsoft/vscode
synced 2024-07-17 02:57:19 +00:00
update Lua-grammar (#167692)
This commit is contained in:
parent
041f4cd3bc
commit
930fd0e469
|
@ -6,7 +6,7 @@
|
|||
"git": {
|
||||
"name": "sumneko/lua.tmbundle",
|
||||
"repositoryUrl": "https://github.com/sumneko/lua.tmbundle",
|
||||
"commitHash": "bc74f9230c3f07c0ecc1bc1727ad98d9e70aff5b"
|
||||
"commitHash": "57be7c5cf8fa173f5f39806822725e503932ab45"
|
||||
}
|
||||
},
|
||||
"licenseDetail": [
|
||||
|
|
|
@ -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/sumneko/lua.tmbundle/commit/bc74f9230c3f07c0ecc1bc1727ad98d9e70aff5b",
|
||||
"version": "https://github.com/sumneko/lua.tmbundle/commit/57be7c5cf8fa173f5f39806822725e503932ab45",
|
||||
"name": "Lua",
|
||||
"scopeName": "source.lua",
|
||||
"patterns": [
|
||||
|
@ -187,13 +187,17 @@
|
|||
"name": "entity.name.class.lua"
|
||||
},
|
||||
{
|
||||
"match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",
|
||||
"match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
|
||||
"name": "entity.other.attribute.lua"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)",
|
||||
"name": "variable.other.lua"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*=\\s*\\b(function)\\b)",
|
||||
"name": "entity.name.function.lua"
|
||||
},
|
||||
{
|
||||
"match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|!=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
|
||||
"name": "keyword.operator.lua"
|
||||
|
@ -434,6 +438,26 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@enum",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "variable.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\n)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@type",
|
||||
"beginCaptures": {
|
||||
|
@ -464,10 +488,56 @@
|
|||
"name": "variable.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)(@operator)\\s*(\\b[a-z]+)?",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.function.library.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@cast",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "variable.other.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\n)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
},
|
||||
{
|
||||
"match": "([+-|])",
|
||||
"name": "keyword.operator.lua"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -492,7 +562,7 @@
|
|||
"name": "keyword.operator.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\n)",
|
||||
"end": "(?=[\\n#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
|
@ -538,7 +608,7 @@
|
|||
"name": "keyword.operator.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\n)",
|
||||
"end": "(?=[\\n#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
|
@ -634,6 +704,33 @@
|
|||
},
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@private",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@protected",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@package",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@version",
|
||||
"beginCaptures": {
|
||||
|
@ -748,7 +845,7 @@
|
|||
"name": "keyword.control.lua"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\s)",
|
||||
"end": "(?=[\\s#])",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "[\\(\\),:\\?][ \\t]*",
|
||||
|
@ -780,7 +877,7 @@
|
|||
},
|
||||
{
|
||||
"begin": "(?=[a-zA-Z_\\.\\*\"'\\[])",
|
||||
"end": "(?=[\\s\\)\\,\\?\\:\\}\\|])",
|
||||
"end": "(?=[\\s\\)\\,\\?\\:\\}\\|#])",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?<!,)[ \\t]*",
|
||||
|
|
Loading…
Reference in a new issue