mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
Update grammars (#181143)
This commit is contained in:
@@ -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/dfdf6c33f33b7d478c474afbe1b6b3cd2e99b716",
|
||||
"version": "https://github.com/sumneko/lua.tmbundle/commit/d0d89a3734dd36938d8498a3c16bc734291727cb",
|
||||
"name": "Lua",
|
||||
"scopeName": "source.lua",
|
||||
"patterns": [
|
||||
@@ -60,7 +60,7 @@
|
||||
"end": "(?=[\\),])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -184,7 +184,7 @@
|
||||
},
|
||||
{
|
||||
"match": "\\b(and|or|not|\\|\\||\\&\\&|\\!)\\b",
|
||||
"name": "keyword.operator.lua"
|
||||
"name": "keyword.operator.logical.lua"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
|
||||
@@ -369,7 +369,12 @@
|
||||
"name": "punctuation.definition.comment.end.lua"
|
||||
}
|
||||
},
|
||||
"name": "comment.block.lua"
|
||||
"name": "comment.block.lua",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment_documentation_bracket"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "----",
|
||||
@@ -389,10 +394,13 @@
|
||||
}
|
||||
},
|
||||
"end": "\\n",
|
||||
"name": "comment.line.double-dash.doc.lua",
|
||||
"name": "comment.line.double-dash.documentation.lua",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc"
|
||||
"include": "#emmydoc"
|
||||
},
|
||||
{
|
||||
"include": "#ldoc_tag"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -404,7 +412,12 @@
|
||||
}
|
||||
},
|
||||
"end": "\\n",
|
||||
"name": "comment.line.double-dash.lua"
|
||||
"name": "comment.line.double-dash.lua",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#ldoc_tag"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -421,14 +434,43 @@
|
||||
"name": "punctuation.definition.comment.end.lua"
|
||||
}
|
||||
},
|
||||
"name": "comment.block.lua"
|
||||
"name": "comment.block.lua",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment_documentation_asterisk"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"luadoc": {
|
||||
"comment_documentation_asterisk": {
|
||||
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
|
||||
" ": "^[ \\t]*\\*(?!/)(?=([^*]|[*](?!/))*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(?<=---\\s*)@class",
|
||||
"include": "#emmydoc"
|
||||
},
|
||||
{
|
||||
"include": "#ldoc_tag"
|
||||
}
|
||||
]
|
||||
},
|
||||
"comment_documentation_bracket": {
|
||||
"begin": "(?<=--\\[\\[)([^-]|\\-(?!\\]\\]))*$",
|
||||
"while": "^[ \\t]*-*(?!\\]\\])(?=([^-]|[-](?!\\]\\]))*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#emmydoc"
|
||||
},
|
||||
{
|
||||
"include": "#ldoc_tag"
|
||||
}
|
||||
]
|
||||
},
|
||||
"emmydoc": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(?<=---[ \\t]*)@class",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -447,7 +489,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@enum",
|
||||
"begin": "(?<=---[ \\t]*)@enum",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -467,7 +509,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@type",
|
||||
"begin": "(?<=---[ \\t]*)@type",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -476,12 +518,12 @@
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@alias",
|
||||
"begin": "(?<=---[ \\t]*)@alias",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -499,14 +541,14 @@
|
||||
"end": "(?=[\\n#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)(@operator)\\s*(\\b[a-z]+)?",
|
||||
"begin": "(?<=---[ \\t]*)(@operator)\\s*(\\b[a-z]+)?",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -518,12 +560,12 @@
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@cast",
|
||||
"begin": "(?<=---[ \\t]*)@cast",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -541,7 +583,7 @@
|
||||
"end": "(?=\\n)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
},
|
||||
{
|
||||
"match": "([+-|])",
|
||||
@@ -552,7 +594,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@param",
|
||||
"begin": "(?<=---[ \\t]*)@param",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -573,14 +615,14 @@
|
||||
"end": "(?=[\\n#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@return",
|
||||
"begin": "(?<=---[ \\t]*)@return",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -593,12 +635,12 @@
|
||||
"name": "keyword.operator.lua"
|
||||
},
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@field",
|
||||
"begin": "(?<=---[ \\t]*)@field",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -622,7 +664,7 @@
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
},
|
||||
{
|
||||
"match": "\\]",
|
||||
@@ -633,7 +675,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@generic",
|
||||
"begin": "(?<=---[ \\t]*)@generic",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -660,14 +702,14 @@
|
||||
"name": "keyword.operator.lua"
|
||||
},
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@vararg",
|
||||
"begin": "(?<=---[ \\t]*)@vararg",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -676,12 +718,12 @@
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@overload",
|
||||
"begin": "(?<=---[ \\t]*)@overload",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -690,12 +732,12 @@
|
||||
"end": "(?=[\\n@#])",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@deprecated",
|
||||
"begin": "(?<=---[ \\t]*)@deprecated",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -704,7 +746,7 @@
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@meta",
|
||||
"begin": "(?<=---[ \\t]*)@meta",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -713,7 +755,7 @@
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@private",
|
||||
"begin": "(?<=---[ \\t]*)@private",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -722,7 +764,7 @@
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@protected",
|
||||
"begin": "(?<=---[ \\t]*)@protected",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -731,7 +773,7 @@
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@package",
|
||||
"begin": "(?<=---[ \\t]*)@package",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -740,7 +782,7 @@
|
||||
"end": "(?=[\\n@#])"
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@version",
|
||||
"begin": "(?<=---[ \\t]*)@version",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -759,7 +801,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@see",
|
||||
"begin": "(?<=---[ \\t]*)@see",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -778,7 +820,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@diagnostic",
|
||||
"begin": "(?<=---[ \\t]*)@diagnostic",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -811,7 +853,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?<=---\\s*)@module",
|
||||
"begin": "(?<=---[ \\t]*)@module",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "storage.type.annotation.lua"
|
||||
@@ -825,7 +867,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(?<=---\\s*)@(async|nodiscard)",
|
||||
"match": "(?<=---[ \\t]*)@(async|nodiscard)",
|
||||
"name": "storage.type.annotation.lua"
|
||||
},
|
||||
{
|
||||
@@ -844,7 +886,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"luadoc.type": {
|
||||
"emmydoc.type": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\\bfun\\b",
|
||||
@@ -864,7 +906,7 @@
|
||||
"name": "entity.name.variable.lua"
|
||||
},
|
||||
{
|
||||
"include": "#luadoc.type"
|
||||
"include": "#emmydoc.type"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
@@ -901,6 +943,18 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ldoc_tag": {
|
||||
"match": "\\G[ \\t]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\\b",
|
||||
"end": "(?!@)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.block.tag.ldoc"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.class.ldoc"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user