VSCode hangs when opening python file. Fixes #56377
This commit is contained in:
parent
53cfd4e21e
commit
72509c5625
|
@ -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/MagicStack/MagicPython/commit/fb56c6a98d684e30bed1b0f9647e85741a48f914",
|
||||
"version": "https://github.com/MagicStack/MagicPython/commit/b453f26ed856c9b16a053517c41207e3a72cc7d5",
|
||||
"name": "MagicPython",
|
||||
"scopeName": "source.python",
|
||||
"patterns": [
|
||||
|
@ -97,8 +97,7 @@
|
|||
},
|
||||
"docstring-statement": {
|
||||
"begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
||||
"comment": "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring",
|
||||
"end": "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
||||
"end": "(?<=\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\")",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#docstring"
|
||||
|
@ -165,7 +164,7 @@
|
|||
{
|
||||
"name": "string.quoted.docstring.single.python",
|
||||
"begin": "(\\'|\\\")",
|
||||
"end": "(\\1)|(\\n)",
|
||||
"end": "(\\1)|((?<!\\\\)\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.string.begin.python"
|
||||
|
@ -191,7 +190,7 @@
|
|||
{
|
||||
"name": "string.quoted.docstring.raw.single.python",
|
||||
"begin": "([rR])(\\'|\\\")",
|
||||
"end": "(\\2)|(\\n)",
|
||||
"end": "(\\2)|((?<!\\\\)\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.string.python"
|
||||
|
@ -848,45 +847,40 @@
|
|||
"match": "\\\\$"
|
||||
},
|
||||
"string-formatting": {
|
||||
"name": "meta.format.percent.python",
|
||||
"match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsa%]\n )\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
}
|
||||
}
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"match": "(?x)\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsa%]\n"
|
||||
},
|
||||
"string-brace-formatting": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "meta.format.brace.python",
|
||||
"match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"match": "(?x)\n (?:\n {{ | }}\n | (?:\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
},
|
||||
"3": {
|
||||
"2": {
|
||||
"name": "storage.type.format.python"
|
||||
},
|
||||
"4": {
|
||||
"3": {
|
||||
"name": "storage.type.format.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.format.brace.python",
|
||||
"match": "(?x)\n (\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (\n [^'\"{}\\n]+?\n |\n \\{ [^'\"}\\n]*? \\}\n )*\n }\n )\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "constant.character.format.placeholder.other.python"
|
||||
"name": "constant.character.format.placeholder.other.python",
|
||||
"begin": "(?x)\n \\{\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (?=[^'\"}\\n]*\\})\n",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"2": {
|
||||
"name": "storage.type.format.python"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.format.python"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.type.format.python"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x) \\{ [^'\"}\\n]*? \\} (?=.*?\\})\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -4543,7 +4537,7 @@
|
|||
},
|
||||
"string-quoted-single-line": {
|
||||
"name": "string.quoted.single.python",
|
||||
"begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))",
|
||||
"begin": "(\\b[rR](?=[uU]))?([uU])?((['\"]))",
|
||||
"end": "(\\3)|((?<!\\\\)\\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
|
@ -4717,7 +4711,7 @@
|
|||
},
|
||||
"string-quoted-multi-line": {
|
||||
"name": "string.quoted.multi.python",
|
||||
"begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")",
|
||||
"begin": "(\\b[rR](?=[uU]))?([uU])?('''|\"\"\")",
|
||||
"end": "(\\3)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
|
|
Loading…
Reference in a new issue