From 6c584dc5923398f43f6df1e09f1e6e07a12d4b44 Mon Sep 17 00:00:00 2001 From: Daniel Biehl Date: Tue, 5 Mar 2024 23:50:37 +0100 Subject: [PATCH] fix(vscode): correct some things in bracket highlightning and coloring --- language-configuration.json | 12 - package.json | 11 +- syntaxes/robotframework.tmLanguage.json | 3403 ++++++----------------- 3 files changed, 864 insertions(+), 2562 deletions(-) diff --git a/language-configuration.json b/language-configuration.json index 509f67839..76add2a0a 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -5,9 +5,6 @@ }, // symbols used as brackets "brackets": [ - ["${{", "}}"], - ["&{{", "}}"], - ["@{{", "}}"], ["${", "}"], ["@{", "}"], ["%{", "}"], @@ -17,9 +14,6 @@ ["(", ")"] ], "colorizedBracketPairs": [ - ["${{", "}}"], - ["&{{", "}}"], - ["@{{", "}}"], ["${", "}"], ["@{", "}"], ["%{", "}"], @@ -30,9 +24,6 @@ ], // symbols that are auto closed when typing "autoClosingPairs": [ - ["${{", "}}"], - ["&{{", "}}"], - ["@{{", "}}"], ["${", "}"], ["@{", "}"], ["%{", "}"], @@ -45,9 +36,6 @@ ], // symbols that can be used to surround a selection "surroundingPairs": [ - ["${{", "}}"], - ["&{{", "}}"], - ["@{{", "}}"], ["${", "}"], ["@{", "}"], ["%{", "}"], diff --git a/package.json b/package.json index cecf3777a..04c2ef976 100644 --- a/package.json +++ b/package.json @@ -284,11 +284,13 @@ "keyword.modifier.bdd-prefix.robotframework" ], "continuation": [ - "punctuation.separator.continuation.robotframework" + "keyword.operator.continuation.robotframework" + ], + "separator": [ + "keyword.operator.terminator.robotframework" ], - "separator": [], "terminator": [ - "punctuation.terminator.robotframework" + "keyword.operator.terminator.robotframework" ], "variableBegin": [ "punctuation.definition.variable.begin.robotframework" @@ -343,7 +345,8 @@ "tokenTypes": { "string.unquoted.argument.robotframework": "other", "variable.expression.robotframework": "other" - } + }, + "unbalancedBracketScopes": ["comment.robotframework", "comment"] } ], "keybindings": [ diff --git a/syntaxes/robotframework.tmLanguage.json b/syntaxes/robotframework.tmLanguage.json index b346490d7..45612f80b 100644 --- a/syntaxes/robotframework.tmLanguage.json +++ b/syntaxes/robotframework.tmLanguage.json @@ -1,256 +1,155 @@ { - "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - - "repository": { - "header": { - "name": "keyword.other.header.robotframework", - "match": "(^\\*\\*\\*.*?\\*\\*\\*)|((?<=^\\|)\\s+\\*\\*\\*.*?\\*\\*\\*)" - }, - "variable_setting": { - "name": "meta.variable.assign.robotframework", - "contentName": "string.unquoted.argument.robotframework", - "begin": "^(?:([$@&%]\\{)(.+?}*)(\\})( ?=)?)", - "beginCaptures": { - "1": { - "name": "keyword.operator.robotframework" - }, - "2": { - "name": "variable.other.readwrite.robotframework" - }, - "3": { - "name": "keyword.operator.robotframework" - }, - "4": { - "name": "keyword.operator.robotframework" - } - }, - "end": "^(?!\\s*\\.\\.\\.)", - "patterns": [ - { - "include": "#escape" - }, - { - "include": "#comment" - }, - { - "include": "#line_continuation" - }, - { - "include": "#variables" - } - ] - }, - "variables": { - "patterns": [ - { - "include": "#expression_var" - }, - { - "include": "#simple_var" - } - ] - }, - "expression_var": { - "name": "meta.variables.robotframework", - "match": "(?i)(?:(?:(?>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", - "captures": { - "1": { - "name": "keyword.control.flow.python" - } - } + "captures": { "1": { "name": "keyword.control.flow.python" } } }, - "expression-bare": { "comment": "valid Python expressions w/o comments and line continuation", "patterns": [ - { - "include": "#backticks" - }, - { - "include": "#illegal-anno" - }, - { - "include": "#literal" - }, - { - "include": "#regexp" - }, - { - "include": "#string" - }, - { - "include": "#lambda" - }, - { - "include": "#generator" - }, - { - "include": "#illegal-operator" - }, - { - "include": "#robot-variable-names" - }, - { - "include": "#operator" - }, - { - "include": "#curly-braces" - }, - { - "include": "#item-access" - }, - { - "include": "#list" - }, - { - "include": "#odd-function-call" - }, - { - "include": "#round-braces" - }, - { - "include": "#function-call" - }, - { - "include": "#builtin-functions" - }, - { - "include": "#builtin-types" - }, - { - "include": "#builtin-exceptions" - }, - { - "include": "#magic-names" - }, - { - "include": "#special-names" - }, - { - "include": "#illegal-names" - }, - { - "include": "#special-variables" - }, - { - "include": "#ellipsis" - }, - { - "include": "#punctuation" - }, - { - "include": "#line-continuation" - } + { "include": "#backticks" }, + { "include": "#illegal-anno" }, + { "include": "#literal" }, + { "include": "#regexp" }, + { "include": "#string" }, + { "include": "#lambda" }, + { "include": "#generator" }, + { "include": "#illegal-operator" }, + { "include": "#robot-variable-names" }, + { "include": "#operator" }, + { "include": "#curly-braces" }, + { "include": "#item-access" }, + { "include": "#list" }, + { "include": "#odd-function-call" }, + { "include": "#round-braces" }, + { "include": "#function-call" }, + { "include": "#builtin-functions" }, + { "include": "#builtin-types" }, + { "include": "#builtin-exceptions" }, + { "include": "#magic-names" }, + { "include": "#special-names" }, + { "include": "#illegal-names" }, + { "include": "#special-variables" }, + { "include": "#ellipsis" }, + { "include": "#punctuation" }, + { "include": "#line-continuation" } ] }, "expression-base": { "comment": "valid Python expressions with comments and line continuation", "patterns": [ - { - "include": "#comments" - }, - { - "include": "#expression-bare" - }, - { - "include": "#line-continuation" - } + { "include": "#comments" }, + { "include": "#expression-bare" }, + { "include": "#line-continuation" } ] }, "expression": { "comment": "All valid Python expressions", "patterns": [ - { - "include": "#expression-base" - }, - { - "include": "#member-access" - }, + { "include": "#expression-base" }, + { "include": "#member-access" }, { "comment": "Tokenize identifiers to help linters", "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" @@ -553,43 +321,21 @@ "name": "meta.member.access.python", "begin": "(\\.)\\s*(?!\\.)", "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n", - "beginCaptures": { - "1": { - "name": "punctuation.separator.period.python" - } - }, + "beginCaptures": { "1": { "name": "punctuation.separator.period.python" } }, "patterns": [ - { - "include": "#function-call" - }, - { - "include": "#member-access-base" - }, - { - "include": "#member-access-attribute" - } + { "include": "#function-call" }, + { "include": "#member-access-base" }, + { "include": "#member-access-attribute" } ] }, "member-access-base": { "patterns": [ - { - "include": "#magic-names" - }, - { - "include": "#illegal-names" - }, - { - "include": "#illegal-object-name" - }, - { - "include": "#special-names" - }, - { - "include": "#line-continuation" - }, - { - "include": "#item-access" - } + { "include": "#magic-names" }, + { "include": "#illegal-names" }, + { "include": "#illegal-object-name" }, + { "include": "#special-names" }, + { "include": "#line-continuation" }, + { "include": "#item-access" } ] }, "member-access-attribute": { @@ -598,116 +344,58 @@ "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" }, "special-names": { - "patterns": [ - { - "include": "#robot-variable-names" - } - ] + "patterns": [ { "include": "#robot-variable-names" } ] }, "curly-braces": { "begin": "\\{", "end": "\\}", - "beginCaptures": { - "0": { - "name": "punctuation.definition.dict.begin.python" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.dict.end.python" - } - }, + "beginCaptures": { "0": { "name": "punctuation.definition.dict.begin.python" } }, + "endCaptures": { "0": { "name": "punctuation.definition.dict.end.python" } }, "patterns": [ { "name": "punctuation.separator.dict.python", "match": ":" }, - { - "include": "#expression" - } + { "include": "#expression" } ] }, "list": { "begin": "\\[", "end": "\\]", - "beginCaptures": { - "0": { - "name": "punctuation.definition.list.begin.python" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.list.end.python" - } - }, - "patterns": [ - { - "include": "#expression" - } - ] + "beginCaptures": { "0": { "name": "punctuation.definition.list.begin.python" } }, + "endCaptures": { "0": { "name": "punctuation.definition.list.end.python" } }, + "patterns": [ { "include": "#expression" } ] }, "odd-function-call": { "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n", "begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n", "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.python" - } - }, - "patterns": [ - { - "include": "#function-arguments" - } - ] + "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, + "patterns": [ { "include": "#function-arguments" } ] }, "round-braces": { "begin": "\\(", "end": "\\)", - "beginCaptures": { - "0": { - "name": "punctuation.parenthesis.begin.python" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.parenthesis.end.python" - } - }, - "patterns": [ - { - "include": "#expression" - } - ] + "beginCaptures": { "0": { "name": "punctuation.parenthesis.begin.python" } }, + "endCaptures": { "0": { "name": "punctuation.parenthesis.end.python" } }, + "patterns": [ { "include": "#expression" } ] }, "line-continuation": { "patterns": [ { "match": "(\\\\)\\s*(\\S.*$\\n?)", "captures": { - "1": { - "name": "punctuation.separator.continuation.line.python" - }, - "2": { - "name": "invalid.illegal.line.continuation.python" - } + "1": { "name": "punctuation.separator.continuation.line.python" }, + "2": { "name": "invalid.illegal.line.continuation.python" } } }, { "begin": "(\\\\)\\s*$\\n?", "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", - "beginCaptures": { - "1": { - "name": "punctuation.separator.continuation.line.python" - } - }, + "beginCaptures": { "1": { "name": "punctuation.separator.continuation.line.python" } }, "patterns": [ - { - "include": "#regexp" - }, - { - "include": "#string" - } + { "include": "#regexp" }, + { "include": "#string" } ] } ] @@ -719,24 +407,12 @@ "operator": { "match": "(?x)\n \\b(?> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n\n | (:=) (?# 6)\n", "captures": { - "1": { - "name": "keyword.operator.logical.python" - }, - "2": { - "name": "keyword.control.flow.python" - }, - "3": { - "name": "keyword.operator.bitwise.python" - }, - "4": { - "name": "keyword.operator.arithmetic.python" - }, - "5": { - "name": "keyword.operator.comparison.python" - }, - "6": { - "name": "keyword.operator.assignment.python" - } + "1": { "name": "keyword.operator.logical.python" }, + "2": { "name": "keyword.control.flow.python" }, + "3": { "name": "keyword.operator.bitwise.python" }, + "4": { "name": "keyword.operator.arithmetic.python" }, + "5": { "name": "keyword.operator.comparison.python" }, + "6": { "name": "keyword.operator.assignment.python" } } }, "punctuation": { @@ -757,32 +433,18 @@ "name": "constant.language.python", "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" }, - { - "include": "#number" - } + { "include": "#number" } ] }, "number": { "name": "constant.numeric.python", "patterns": [ - { - "include": "#number-float" - }, - { - "include": "#number-dec" - }, - { - "include": "#number-hex" - }, - { - "include": "#number-oct" - }, - { - "include": "#number-bin" - }, - { - "include": "#number-long" - }, + { "include": "#number-float" }, + { "include": "#number-dec" }, + { "include": "#number-hex" }, + { "include": "#number-oct" }, + { "include": "#number-bin" }, + { "include": "#number-long" }, { "name": "invalid.illegal.name.python", "match": "\\b[0-9]+\\w+" @@ -792,134 +454,68 @@ "number-float": { "name": "constant.numeric.float.python", "match": "(?x)\n (?=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", "captures": { - "1": { - "name": "constant.character.format.placeholder.other.python" - }, - "3": { - "name": "storage.type.format.python" - }, - "4": { - "name": "storage.type.format.python" - } + "1": { "name": "constant.character.format.placeholder.other.python" }, + "3": { "name": "storage.type.format.python" }, + "4": { "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", "captures": { - "1": { - "name": "constant.character.format.placeholder.other.python" - }, - "3": { - "name": "storage.type.format.python" - }, - "4": { - "name": "storage.type.format.python" - } + "1": { "name": "constant.character.format.placeholder.other.python" }, + "3": { "name": "storage.type.format.python" }, + "4": { "name": "storage.type.format.python" } } } ] }, "fstring-formatting": { "patterns": [ - { - "include": "#fstring-formatting-braces" - }, - { - "include": "#fstring-formatting-singe-brace" - } + { "include": "#fstring-formatting-braces" }, + { "include": "#fstring-formatting-singe-brace" } ] }, "fstring-formatting-singe-brace": { @@ -1109,34 +637,18 @@ "patterns": [ { "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))", - "captures": { - "1": { - "name": "keyword.control.flow.python" - } - } + "captures": { "1": { "name": "keyword.control.flow.python" } } }, { "match": "\\b(lambda)\\s*?(?=[,\\n]|$)", - "captures": { - "1": { - "name": "storage.type.function.lambda.python" - } - } + "captures": { "1": { "name": "storage.type.function.lambda.python" } } }, { "name": "meta.lambda-function.python", "begin": "(?x)\n \\b (lambda) \\b\n", "end": "(:)|(\\n)", - "beginCaptures": { - "1": { - "name": "storage.type.function.lambda.python" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.section.function.lambda.begin.python" - } - }, + "beginCaptures": { "1": { "name": "storage.type.function.lambda.python" } }, + "endCaptures": { "1": { "name": "punctuation.section.function.lambda.begin.python" } }, "contentName": "meta.function.lambda.parameters.python", "patterns": [ { @@ -1147,41 +659,21 @@ "name": "keyword.operator.unpacking.parameter.python", "match": "(\\*\\*|\\*)" }, - { - "include": "#lambda-nested-incomplete" - }, - { - "include": "#illegal-names" - }, + { "include": "#lambda-nested-incomplete" }, + { "include": "#illegal-names" }, { "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))", "captures": { - "1": { - "name": "variable.parameter.function.language.python" - }, - "2": { - "name": "punctuation.separator.parameters.python" - } + "1": { "name": "variable.parameter.function.language.python" }, + "2": { "name": "punctuation.separator.parameters.python" } } }, - { - "include": "#comments" - }, - { - "include": "#backticks" - }, - { - "include": "#illegal-anno" - }, - { - "include": "#lambda-parameter-with-default" - }, - { - "include": "#line-continuation" - }, - { - "include": "#illegal-operator" - } + { "include": "#comments" }, + { "include": "#backticks" }, + { "include": "#illegal-anno" }, + { "include": "#lambda-parameter-with-default" }, + { "include": "#line-continuation" }, + { "include": "#illegal-operator" } ] } ] @@ -1198,43 +690,19 @@ "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n", "end": "(,)|(?=:|$)", "beginCaptures": { - "1": { - "name": "variable.parameter.function.language.python" - }, - "2": { - "name": "keyword.operator.python" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.separator.parameters.python" - } + "1": { "name": "variable.parameter.function.language.python" }, + "2": { "name": "keyword.operator.python" } }, - "patterns": [ - { - "include": "#expression" - } - ] + "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, + "patterns": [ { "include": "#expression" } ] }, "generator": { "comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n", "begin": "\\bfor\\b", - "beginCaptures": { - "0": { - "name": "keyword.control.flow.python" - } - }, + "beginCaptures": { "0": { "name": "keyword.control.flow.python" } }, "end": "\\bin\\b", - "endCaptures": { - "0": { - "name": "keyword.control.flow.python" - } - }, - "patterns": [ - { - "include": "#expression" - } - ] + "endCaptures": { "0": { "name": "keyword.control.flow.python" } }, + "patterns": [ { "include": "#expression" } ] }, "item-access": { "patterns": [ @@ -1242,36 +710,20 @@ "name": "meta.item-access.python", "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", "end": "(\\])", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.python" - } - }, + "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "patterns": [ - { - "include": "#item-name" - }, - { - "include": "#item-index" - }, - { - "include": "#expression" - } + { "include": "#item-name" }, + { "include": "#item-index" }, + { "include": "#expression" } ] } ] }, "item-name": { "patterns": [ - { - "include": "#special-variables" - }, - { - "include": "#builtin-functions" - }, - { - "include": "#special-names" - }, + { "include": "#special-variables" }, + { "include": "#builtin-functions" }, + { "include": "#special-names" }, { "name": "meta.indexed-name.python", "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" @@ -1281,20 +733,14 @@ "item-index": { "begin": "(\\[)", "end": "(?=\\])", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.python" - } - }, + "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.python" } }, "contentName": "meta.item-access.arguments.python", "patterns": [ { "name": "punctuation.separator.slice.python", "match": ":" }, - { - "include": "#expression" - } + { "include": "#expression" } ] }, "function-call": { @@ -1302,28 +748,16 @@ "comment": "Regular function call of the type \"name(args)\"", "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.python" - } - }, + "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "patterns": [ - { - "include": "#special-variables" - }, - { - "include": "#function-name" - }, - { - "include": "#function-arguments" - } + { "include": "#special-variables" }, + { "include": "#function-name" }, + { "include": "#function-arguments" } ] }, "function-name": { "patterns": [ - { - "include": "#builtin-possible-callables" - }, + { "include": "#builtin-possible-callables" }, { "comment": "Some color schemas support meta.function-call.generic scope", "name": "meta.function-call.generic.python", @@ -1334,11 +768,7 @@ "function-arguments": { "begin": "(\\()", "end": "(?=\\))(?!\\)\\s*\\()", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.python" - } - }, + "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.python" } }, "contentName": "meta.function-call.arguments.python", "patterns": [ { @@ -1347,76 +777,44 @@ }, { "match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n", - "captures": { - "1": { - "name": "keyword.operator.unpacking.arguments.python" - } - } - }, - { - "include": "#lambda-incomplete" - }, - { - "include": "#illegal-names" + "captures": { "1": { "name": "keyword.operator.unpacking.arguments.python" } } }, + { "include": "#lambda-incomplete" }, + { "include": "#illegal-names" }, { "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", "captures": { - "1": { - "name": "variable.parameter.function-call.python" - }, - "2": { - "name": "keyword.operator.assignment.python" - } + "1": { "name": "variable.parameter.function-call.python" }, + "2": { "name": "keyword.operator.assignment.python" } } }, { "name": "keyword.operator.assignment.python", "match": "=(?!=)" }, - { - "include": "#expression" - }, + { "include": "#expression" }, { "match": "\\s*(\\))\\s*(\\()", "captures": { - "1": { - "name": "punctuation.definition.arguments.end.python" - }, - "2": { - "name": "punctuation.definition.arguments.begin.python" - } + "1": { "name": "punctuation.definition.arguments.end.python" }, + "2": { "name": "punctuation.definition.arguments.begin.python" } } } ] }, "builtin-callables": { "patterns": [ - { - "include": "#illegal-names" - }, - { - "include": "#illegal-object-name" - }, - { - "include": "#builtin-exceptions" - }, - { - "include": "#builtin-functions" - }, - { - "include": "#builtin-types" - } + { "include": "#illegal-names" }, + { "include": "#illegal-object-name" }, + { "include": "#builtin-exceptions" }, + { "include": "#builtin-functions" }, + { "include": "#builtin-types" } ] }, "builtin-possible-callables": { "patterns": [ - { - "include": "#builtin-callables" - }, - { - "include": "#magic-names" - } + { "include": "#builtin-callables" }, + { "include": "#magic-names" } ] }, "builtin-exceptions": { @@ -1442,72 +840,44 @@ "magic-function-names": { "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext\n | await | bool | call | ceil | class_getitem\n | cmp | coerce | complex | contains | copy\n | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq\n | exit | float | floor | floordiv | format | ge\n | get | getattr | getattribute | getinitargs\n | getitem | getnewargs | getslice | getstate | gt\n | hash | hex | iadd | iand | idiv | ifloordiv |\n | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow\n | irshift | isub | iter | itruediv | ixor | le\n | len | long | lshift | lt | missing | mod | mul\n | ne | neg | new | next | nonzero | oct | or | pos\n | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv |\n | rlshift | rmod | rmul | ror | round | rpow\n | rrshift | rshift | rsub | rtruediv | rxor | set\n | setattr | setitem | set_name | setslice\n | setstate | sizeof | str | sub | subclasscheck\n | truediv | trunc | unicode | xor | matmul\n | rmatmul | imatmul | init_subclass | set_name\n | fspath | bytes | prepare | length_hint\n )__\n )\\b\n", - "captures": { - "1": { - "name": "support.function.magic.python" - } - } + "captures": { "1": { "name": "support.function.magic.python" } } }, "magic-variable-names": { "comment": "magic variables which a class/module may have.", "match": "(?x)\n \\b(\n __(?:\n all | annotations | bases | builtins | class\n | closure | code | debug | defaults | dict | doc | file | func\n | globals | kwdefaults | match_args | members | metaclass | methods\n | module | mro | mro_entries | name | qualname | post_init | self\n | signature | slots | subclasses | version | weakref | wrapped\n | classcell | spec | path | package | future | traceback\n )__\n )\\b\n", - "captures": { - "1": { - "name": "support.variable.magic.python" - } - } + "captures": { "1": { "name": "support.variable.magic.python" } } }, "magic-names": { "patterns": [ - { - "include": "#magic-function-names" - }, - { - "include": "#magic-variable-names" - } + { "include": "#magic-function-names" }, + { "include": "#magic-variable-names" } ] }, "illegal-names": { "match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n", "captures": { - "1": { - "name": "keyword.control.flow.python" - }, - "2": { - "name": "keyword.control.import.python" - } + "1": { "name": "keyword.control.flow.python" }, + "2": { "name": "keyword.control.import.python" } } }, "special-variables": { "match": "(?x)\n \\b (?)\n", "end": "(\\)|(?=\\'))|((?=(?)\n", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { - "1": { - "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" - }, - "2": { - "name": "entity.name.tag.named.group.regexp" - } + "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, + "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { - "1": { - "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#single-three-regexp-expression" - }, - { - "include": "#comments-string-single-three" - } + { "include": "#single-three-regexp-expression" }, + { "include": "#comments-string-single-three" } ] }, "single-three-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\\'\\'\\'))", - "beginCaptures": { - "0": { - "name": "punctuation.comment.begin.regexp" - } - }, + "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { - "1": { - "name": "punctuation.comment.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "punctuation.comment.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [ - { - "include": "#codetags" - } - ] + "patterns": [ { "include": "#codetags" } ] }, "single-three-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookahead.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookahead.begin.regexp" - } + "0": { "name": "keyword.operator.lookahead.regexp" }, + "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#single-three-regexp-expression" - }, - { - "include": "#comments-string-single-three" - } + { "include": "#single-three-regexp-expression" }, + { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookahead.negative.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookahead.begin.regexp" - } + "0": { "name": "keyword.operator.lookahead.negative.regexp" }, + "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#single-three-regexp-expression" - }, - { - "include": "#comments-string-single-three" - } + { "include": "#single-three-regexp-expression" }, + { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookbehind.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookbehind.begin.regexp" - } + "0": { "name": "keyword.operator.lookbehind.regexp" }, + "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#single-three-regexp-expression" - }, - { - "include": "#comments-string-single-three" - } + { "include": "#single-three-regexp-expression" }, + { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookbehind-negative": { "begin": "(\\()\\?)\n", "end": "(\\)|(?=\"))|((?=(?)\n", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { - "1": { - "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" - }, - "2": { - "name": "entity.name.tag.named.group.regexp" - } + "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, + "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { - "1": { - "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#double-three-regexp-expression" - }, - { - "include": "#comments-string-double-three" - } + { "include": "#double-three-regexp-expression" }, + { "include": "#comments-string-double-three" } ] }, "double-three-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\"\"\"))", - "beginCaptures": { - "0": { - "name": "punctuation.comment.begin.regexp" - } - }, + "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { - "1": { - "name": "punctuation.comment.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "punctuation.comment.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [ - { - "include": "#codetags" - } - ] + "patterns": [ { "include": "#codetags" } ] }, "double-three-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookahead.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookahead.begin.regexp" - } + "0": { "name": "keyword.operator.lookahead.regexp" }, + "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#double-three-regexp-expression" - }, - { - "include": "#comments-string-double-three" - } + { "include": "#double-three-regexp-expression" }, + { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookahead.negative.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookahead.begin.regexp" - } + "0": { "name": "keyword.operator.lookahead.negative.regexp" }, + "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#double-three-regexp-expression" - }, - { - "include": "#comments-string-double-three" - } + { "include": "#double-three-regexp-expression" }, + { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { - "0": { - "name": "keyword.operator.lookbehind.regexp" - }, - "1": { - "name": "punctuation.parenthesis.lookbehind.begin.regexp" - } + "0": { "name": "keyword.operator.lookbehind.regexp" }, + "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { - "1": { - "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#double-three-regexp-expression" - }, - { - "include": "#comments-string-double-three" - } + { "include": "#double-three-regexp-expression" }, + { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookbehind-negative": { "begin": "(\\()\\?=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", "captures": { - "1": { - "name": "storage.type.format.python" - }, - "2": { - "name": "storage.type.format.python" - } + "1": { "name": "storage.type.format.python" }, + "2": { "name": "storage.type.format.python" } } }, - { - "include": "#fstring-terminator-single-tail" - } + { "include": "#fstring-terminator-single-tail" } ] }, "fstring-terminator-single-tail": { "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", "end": "(?=})|(?=\\n)", "beginCaptures": { - "1": { - "name": "storage.type.format.python" - }, - "2": { - "name": "storage.type.format.python" - } + "1": { "name": "storage.type.format.python" }, + "2": { "name": "storage.type.format.python" } }, "patterns": [ - { - "include": "#fstring-illegal-single-brace" - }, - { - "include": "#fstring-single-brace" - }, + { "include": "#fstring-illegal-single-brace" }, + { "include": "#fstring-single-brace" }, { "name": "storage.type.format.python", "match": "([bcdeEfFgGnosxX%])(?=})" @@ -3729,37 +2133,19 @@ "begin": "(\\b[fF])([bBuU])?('''|\"\"\")", "end": "(\\3)", "beginCaptures": { - "1": { - "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" - }, - "2": { - "name": "invalid.illegal.prefix.python" - }, - "3": { - "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python" - } + "1": { "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" }, + "2": { "name": "invalid.illegal.prefix.python" }, + "3": { "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python" } }, "endCaptures": { - "1": { - "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#fstring-guts" - }, - { - "include": "#fstring-illegal-multi-brace" - }, - { - "include": "#fstring-multi-brace" - }, - { - "include": "#fstring-multi-core" - } + { "include": "#fstring-guts" }, + { "include": "#fstring-illegal-multi-brace" }, + { "include": "#fstring-multi-brace" }, + { "include": "#fstring-multi-core" } ] }, "fstring-normf-quoted-multi-line": { @@ -3767,37 +2153,19 @@ "begin": "(\\b[bBuU])([fF])('''|\"\"\")", "end": "(\\3)", "beginCaptures": { - "1": { - "name": "invalid.illegal.prefix.python" - }, - "2": { - "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" - }, - "3": { - "name": "punctuation.definition.string.begin.python string.quoted.multi.python" - } + "1": { "name": "invalid.illegal.prefix.python" }, + "2": { "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" }, + "3": { "name": "punctuation.definition.string.begin.python string.quoted.multi.python" } }, "endCaptures": { - "1": { - "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#fstring-guts" - }, - { - "include": "#fstring-illegal-multi-brace" - }, - { - "include": "#fstring-multi-brace" - }, - { - "include": "#fstring-multi-core" - } + { "include": "#fstring-guts" }, + { "include": "#fstring-illegal-multi-brace" }, + { "include": "#fstring-multi-brace" }, + { "include": "#fstring-multi-core" } ] }, "fstring-raw-quoted-multi-line": { @@ -3805,34 +2173,18 @@ "begin": "(\\b(?:[rR][fF]|[fF][rR]))('''|\"\"\")", "end": "(\\2)", "beginCaptures": { - "1": { - "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" - }, - "2": { - "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" - } + "1": { "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" }, + "2": { "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" } }, "endCaptures": { - "1": { - "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" - }, - "2": { - "name": "invalid.illegal.newline.python" - } + "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" }, + "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ - { - "include": "#fstring-raw-guts" - }, - { - "include": "#fstring-illegal-multi-brace" - }, - { - "include": "#fstring-multi-brace" - }, - { - "include": "#fstring-raw-multi-core" - } + { "include": "#fstring-raw-guts" }, + { "include": "#fstring-illegal-multi-brace" }, + { "include": "#fstring-multi-brace" }, + { "include": "#fstring-raw-multi-core" } ] }, "fstring-multi-core": { @@ -3847,23 +2199,11 @@ "comment": "value interpolation using { ... }", "begin": "(\\{)", "end": "(?x)\n (\\})\n", - "beginCaptures": { - "1": { - "name": "constant.character.format.placeholder.other.python" - } - }, - "endCaptures": { - "1": { - "name": "constant.character.format.placeholder.other.python" - } - }, + "beginCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, + "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "patterns": [ - { - "include": "#fstring-terminator-multi" - }, - { - "include": "#f-expression" - } + { "include": "#fstring-terminator-multi" }, + { "include": "#f-expression" } ] }, "fstring-terminator-multi": { @@ -3879,37 +2219,23 @@ { "match": "(?x)\n ( (?: =?) (?: ![rsa])? )\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", "captures": { - "1": { - "name": "storage.type.format.python" - }, - "2": { - "name": "storage.type.format.python" - } + "1": { "name": "storage.type.format.python" }, + "2": { "name": "storage.type.format.python" } } }, - { - "include": "#fstring-terminator-multi-tail" - } + { "include": "#fstring-terminator-multi-tail" } ] }, "fstring-terminator-multi-tail": { "begin": "((?:=?)(?:![rsa])?)(:)(?=.*?{)", "end": "(?=})", "beginCaptures": { - "1": { - "name": "storage.type.format.python" - }, - "2": { - "name": "storage.type.format.python" - } + "1": { "name": "storage.type.format.python" }, + "2": { "name": "storage.type.format.python" } }, "patterns": [ - { - "include": "#fstring-illegal-multi-brace" - }, - { - "include": "#fstring-multi-brace" - }, + { "include": "#fstring-illegal-multi-brace" }, + { "include": "#fstring-multi-brace" }, { "name": "storage.type.format.python", "match": "([bcdeEfFgGnosxX%])(?=})" @@ -3944,33 +2270,18 @@ } ] } - }, - "patterns": [ - { - "include": "#comment" - }, - { - "include": "#header" - }, - { - "include": "#variable_setting" - }, - { - "include": "#setting" - }, - { - "include": "#testcase_settings" - }, - { - "include": "#keyword_call" - }, - { - "include": "#returning_keyword_call" - } - ], - - "uuid": "a7fae509-bc8d-451e-b5fc-a47feb9d2a9e", - "fileTypes": ["robotframework"], - "name": "Robot Framework", - "scopeName": "source.robotframework" -} + }, + "patterns": [ + { "include": "#comment" }, + { "include": "#header" }, + { "include": "#variable_setting" }, + { "include": "#setting" }, + { "include": "#testcase_settings" }, + { "include": "#keyword_call" }, + { "include": "#returning_keyword_call" } + ], + "uuid": "a7fae509-bc8d-451e-b5fc-a47feb9d2a9e", + "fileTypes": [ "robotframework" ], + "name": "Robot Framework", + "scopeName": "source.robotframework" +} \ No newline at end of file