site/node_modules/shiki/dist/langs/vyper.mjs

158 lines
104 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Vyper", "name": "vyper", "patterns": [{ "include": "#statement" }, { "include": "#expression" }, { "include": "#reserved-names-vyper" }], "repository": { "annotated-parameter": { "begin": "(?x)\n\\b\n([[:alpha:]_]\\w*) \\s* (:)\n", "beginCaptures": { "1": { "name": "variable.parameter.function.language.python" }, "2": { "name": "punctuation.separator.annotation.python" } }, "end": "(,)|(?=\\))", "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, "patterns": [{ "include": "#expression" }, { "match": "=(?!=)", "name": "keyword.operator.assignment.python" }] }, "assignment-operator": { "match": "(?x)\n<<= | >>= | //= | \\*\\*=\n| \\+= | -= | /= | @=\n| \\*= | %= | ~= | \\^= | &= | \\|=\n| =(?!=)\n", "name": "keyword.operator.assignment.python" }, "backticks": { "begin": "\\`", "end": "(?:\\`|(?<!\\\\)(\\n))", "name": "invalid.deprecated.backtick.python", "patterns": [{ "include": "#expression" }] }, "builtin-callables": { "patterns": [{ "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#builtin-exceptions" }, { "include": "#builtin-functions" }, { "include": "#builtin-types" }] }, "builtin-exceptions": { "match": "(?x) (?<!\\.) \\b(\n(\nArithmetic | Assertion | Attribute | Buffer | BlockingIO\n| BrokenPipe | ChildProcess\n| (Connection (Aborted | Refused | Reset)?)\n| EOF | Environment | FileExists | FileNotFound\n| FloatingPoint | IO | Import | Indentation | Index | Interrupted\n| IsADirectory | NotADirectory | Permission | ProcessLookup\n| Timeout\n| Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n| Reference | Runtime | Recursion | Syntax | System\n| Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n| Value | Windows | ZeroDivision | ModuleNotFound\n) Error\n|\n((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n| Unicode | Bytes | Resource\n)? Warning\n|\nSystemExit | Stop(Async)?Iteration\n| KeyboardInterrupt\n| GeneratorExit | (Base)?Exception\n)\\b\n", "name": "support.type.exception.python" }, "builtin-functions": { "patterns": [{ "match": "(?x)\n(?<!\\.) \\b(\n__import__ | abs | all | any | ascii | bin | breakpoint | callable\n| chr | compile | copyright | credits | delattr | dir | divmod\n| enumerate | eval | exec | exit | filter | format | getattr\n| globals | hasattr | hash | help | hex | id | input\n| isinstance | issubclass | iter | len | license | locals | map\n| max | memoryview | min | next | oct | open | ord | pow | print\n| quit | range | reload | repr | reversed | round\n| setattr | sorted | sum | vars | zip\n)\\b\n", "name": "support.function.builtin.python" }, { "match": "(?x)\n(?<!\\.) \\b(\nfile | reduce | intern | raw_input | unicode | cmp | basestring\n| execfile | long | xrange\n)\\b\n", "name": "variable.legacy.builtin.python" }, { "match": "(?x)\n(?<!\\.) \\b(\n_abi_encode | floor | ceil | convert | slice | len | concat | sha256 | method_id | keccak256 | ecrecover | ecadd | ecmul | extract32 | as_wei_value | raw_call | blockhash | bitwise_and | bitwise_or | bitwise_xor | bitwise_not | uint256_addmod | uint256_mulmod | pow_mod256 | sqrt | shift | create_forwarder_to | min | max | empty | abs )\\b\n", "name": "support.function.builtin.vyper" }, { "match": "(?x)\n(?<!\\.) \\b(\nsend | selfdestruct | raw_call | raw_log | create_forwarder_to )\\b\n", "name": "support.function.builtin.lowlevel.vyper" }, { "match": "(?x)\n(?<!\\.) \\b(\nevent )\\b\n", "name": "support.type.event.vyper" }, { "match": "(?x)\n(?<!\\.) \\b(\nmap | struct | HashMap )\\b\n", "name": "support.type.reference.vyper" }, { "match": "(?x)\n(?<!\\.) \\b(\nprivate | nonreentrant | constant | event | internal | view | pure )\\b\n", "name": "support.function.builtin.modifiers.safe.vyper" }, { "match": "(?x)\n(?<!\\.) \\b(\npublic | payable | modifying | external )\\b\n", "name": "support.function.builtin.modifiers.unsafe.vyper" }] }, "builtin-possible-callables": { "patterns": [{ "include": "#builtin-callables" }, { "include": "#magic-names" }] }, "builtin-types": { "patter
\\\\ (
x[0-9A-Fa-f]{2}
| [0-7]{1,3}
| [\\\\"'abfnrtv]
)
`, "name": "constant.character.escape.python" }, "escape-sequence-unicode": { "patterns": [{ "match": "(?x)\n\\\\ (\nu[0-9A-Fa-f]{4}\n| U[0-9A-Fa-f]{8}\n| N\\{[\\w\\s]+?\\}\n)\n", "name": "constant.character.escape.python" }] }, "expression": { "comment": "All valid Python expressions", "patterns": [{ "include": "#expression-base" }, { "include": "#member-access" }, { "comment": "Tokenize identifiers to help linters", "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" }] }, "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": "#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": "#special-variables-types" }] }, "expression-base": { "comment": "valid Python expressions with comments and line continuation", "patterns": [{ "include": "#comments" }, { "include": "#expression-bare" }, { "include": "#line-continuation" }] }, "f-expression": { "comment": "All valid Python expressions, except comments and line continuation", "patterns": [{ "include": "#expression-bare" }, { "include": "#member-access" }, { "comment": "Tokenize identifiers to help linters", "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" }] }, "fregexp-base-expression": { "patterns": [{ "include": "#fregexp-quantifier" }, { "include": "#fstring-formatting-braces" }, { "match": "\\{.*?\\}" }, { "include": "#regexp-base-common" }] }, "fregexp-double-one-line": { "begin": '\\b(([uU]r)|([fF]r)|(r[fF]?))(")', "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "storage.type.string.python" }, "5": { "name": "punctuation.definition.string.begin.python" } }, "end": '(")|(?<!\\\\)(\\n)', "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.interpolated.python string.regexp.quoted.single.python", "patterns": [{ "include": "#double-one-fregexp-expression" }] }, "fregexp-double-three-line": { "begin": '\\b(([uU]r)|([fF]r)|(r[fF]?))(""")', "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "storage.type.string.python" }, "5": { "name": "punctuation.definition.string.begin.python" } }, "end": '(""")', "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.interpolated.python string.regexp.quoted.multi.python", "patterns": [{ "include": "#double-three-fregexp-expression" }] }, "fregexp-quantifier": { "match": "(?x)\n\\{\\{(\n\\d+ | \\d+,(\\d+)? | ,\\d+\n)\\}\\}\n", "name": "keyword.operator.quantifier.regexp" }, "fregexp-single-one-line": { "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\')", "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "storage.type.string.python" }, "5": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\')|(?<!\\\\)(\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.interpolated.python string.regexp.quoted.single.python", "patterns": [{ "include": "#single-one-fregexp-expression" }] }, "fregexp-single-three-line": { "begin": "\\b(([uU]r)|(
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\\n?)
|
(?=[\\\\\\}\\{]|'''|""")
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \\n
`, "name": "string.interpolated.python string.quoted.multi.python" }, "fstring-normf-quoted-multi-line": { "begin": `(\\b[bBuU])([fF])('''|""")`, "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" } }, "end": "(\\3)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.fstring.python", "patterns": [{ "include": "#fstring-guts" }, { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "include": "#fstring-multi-core" }] }, "fstring-normf-quoted-single-line": { "begin": `(\\b[bBuU])([fF])((['"]))`, "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python string.quoted.single.python" } }, "end": "(\\3)|((?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.fstring.python", "patterns": [{ "include": "#fstring-guts" }, { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "include": "#fstring-single-core" }] }, "fstring-raw-guts": { "patterns": [{ "include": "#string-consume-escape" }, { "include": "#fstring-formatting" }] }, "fstring-raw-multi-core": { "match": `(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\\n?)
|
(?=[\\\\\\}\\{]|'''|""")
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \\n
`, "name": "string.interpolated.python string.quoted.raw.multi.python" }, "fstring-raw-quoted-multi-line": { "begin": `(\\b(?:[R][fF]|[fF][R]))('''|""")`, "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" } }, "end": "(\\2)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.fstring.python", "patterns": [{ "include": "#fstring-raw-guts" }, { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "include": "#fstring-raw-multi-core" }] }, "fstring-raw-quoted-single-line": { "begin": `(\\b(?:[R][fF]|[fF][R]))((['"]))`, "beginCaptures": { "1": { "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python" } }, "end": "(\\2)|((?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.fstring.python", "patterns": [{ "include": "#fstring-raw-guts" }, { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "include": "#fstring-raw-single-core" }] }, "fstring-raw-single-core": { "match": `(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\\n?)
|
(?=[\\\\\\}\\{]|(['"])|((?<!\\\\)\\n))
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \\n
`, "name": "string.interpolated.python string.quoted.raw.single.python" }, "fstring-single-brace": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "comment": "value interpolation using { ... }", "end": "(?x)\n(\\})|(?=\\n)\n", "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "patterns": [{ "include": "#fstring-terminator-single" }, { "include": "#f-expression" }] }, "fstring-single-core": { "match": `(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\\n?)
|
(?=[\\\\\\}\\{]|(['"])|((?<!\\\\)\\n))
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \\n
`, "name": "string.interpolated.python string.quoted.single.python" }, "fstring-terminator-multi": { "patterns": [{ "match": "(![rsa])(?=})", "name": "storage.type.format.python" }, { "captures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "match": "(?x)\n(![rsa])?\n( : \\w? [<>=^]? [-+ ]? \\#?\n\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n" }, { "include": "#fstring-terminator-multi-tail" }] }, "fstring-terminator-multi-tail": { "begin": "(![rsa])?(:)(?=.*?{)", "beginCaptures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "end": "(?=})", "patterns": [{ "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "match": "([bcdeEfFgGnosxX%])(?=})", "name": "storage.type.format.python" }, { "match": "(\\.\\d+)", "name": "storage.type.format.python" }, { "match": "(,)", "name": "storage.type.format.python" }, { "match": "(\\d+)", "name": "storage.type.format.python" }, { "match": "(\\#)", "name": "storage.type.format.python" }, { "match": "([-+ ])", "name": "storage.type.format.python" }, { "match": "([<>=^])", "name": "storage.type.format.python" }, { "match": "(\\w)", "name": "storage.type.format.python" }] }, "fstring-terminator-single": { "patterns": [{ "match": "(![rsa])(?=})", "name": "storage.type.format.python" }, { "captures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "match": "(?x)\n(![rsa])?\n( : \\w? [<>=^]? [-+ ]? \\#?\n\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n" }, { "include": "#fstring-terminator-single-tail" }] }, "fstring-terminator-single-tail": { "begin": "(![rsa])?(:)(?=.*?{)", "beginCaptures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "end": "(?=})|(?=\\n)", "patterns": [{ "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "match": "([bcdeEfFgGnosxX%])(?=})", "name": "storage.type.format.python" }, { "match": "(\\.\\d+)", "name": "storage.type.format.python" }, { "match": "(,)", "name": "storage.type.format.python" }, { "match": "(\\d+)", "name": "storage.type.format.python" }, { "match": "(\\#)", "name": "storage.type.format.python" }, { "match": "([-+ ])", "name": "storage.type.format.python" }, { "match": "([<>=^])", "name": "storage.type.format.python" }, { "match": "(\\w)", "name": "storage.type.format.python" }] }, "function-arguments": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.python" } }, "contentName": "meta.function-call.arguments.python", "end": "(?=\\))(?!\\)\\s*\\()", "patterns": [{ "match": "(,)", "name": "punctuation.separator.arguments.python" }, { "captures": { "1": { "name": "keyword.operator.unpacking.arguments.python" } }, "match": "(?x)\n(?:(?<=[,(])|^) \\s* (\\*{1,2})\n" }, { "include": "#lambda-incomplete" }, { "include": "#illegal-names" }, { "captures": { "1": { "name": "variable.parameter.function-call.python" }, "2": { "name": "keyword.operator.assignment.python" } }, "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)" }, { "match": "=(?!=)", "name": "keyword.operator.assignment.python" }, { "include": "#expression" }, { "captures": { "1": { "name": "punctuation.definition.arguments.end.python" }, "2": { "name": "punctuation.definition.arguments.begin.python" } }, "match": "\\s*(\\))\\s*(\\()" }] }, "function-call": { "begin": "(?x)\n\\b(?=\n([[:alpha:]_]\\w*) \\s* (\\()\n)\n", "comment": 'Regular function call of the type "name(args)"', "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "name": "meta.function-call.python", "patterns": [{ "include": "#special-variables" }, { "include": "#function-name" }, { "include": "#function-arguments" }] }, "function-declaration": { "begin": "(?x)\n\\s*\n(?:\\b(async) \\s+)? \\b(def)\\s+\n(?=\n[[:alpha:]_][[:word:]]* \\s* \\(\n)\n", "beginCaptures": { "1": { "name": "storage.type.function.async.python" }, "2": { "name": "storage.type.function.python" } }, "end":
(?=^\\s*$)
|
(?! (\\s* [rR]? (\\'\\'\\'|\\"\\"\\"|\\'|\\"))
|
(\\G $) (?# '\\G' is necessary for ST)
)
`, "patterns": [{ "include": "#regexp" }, { "include": "#string" }] }] }, "list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.list.begin.python" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.list.end.python" } }, "patterns": [{ "include": "#expression" }] }, "literal": { "patterns": [{ "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b", "name": "constant.language.python" }, { "include": "#number" }] }, "loose-default": { "begin": "(=)", "beginCaptures": { "1": { "name": "keyword.operator.python" } }, "end": "(,)|(?=\\))", "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, "patterns": [{ "include": "#expression" }] }, "magic-function-names": { "captures": { "1": { "name": "support.function.magic.python" } }, "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", "match": "(?x)\n\\b(\n__(?:\nabs | add | aenter | aexit | aiter | and | anext | await\n| bool | call | ceil | cmp | coerce | complex | contains\n| copy | deepcopy | del | delattr | delete | delitem\n| delslice | dir | div | divmod | enter | eq | exit | float\n| floor | floordiv | format | ge | get | getattr\n| getattribute | getinitargs | getitem | getnewargs\n| getslice | getstate | gt | hash | hex | iadd | iand | idiv\n| ifloordiv | ilshift | imod | imul | index | init\n| instancecheck | int | invert | ior | ipow | irshift | isub\n| iter | itruediv | ixor | le | len | long | lshift | lt\n| missing | mod | mul | ne | neg | new | next | nonzero | oct | or\n| pos | pow | radd | rand | rdiv | rdivmod | reduce\n| reduce_ex | repr | reversed | rfloordiv | rlshift | rmod\n| rmul | ror | round | rpow | rrshift | rshift | rsub\n| rtruediv | rxor | set | setattr | setitem | setslice\n| setstate | sizeof | str | sub | subclasscheck | truediv\n| trunc | unicode | xor | matmul | rmatmul | imatmul\n| init_subclass | set_name | fspath | bytes | prepare\n)__\n)\\b\n" }, "magic-names": { "patterns": [{ "include": "#magic-function-names" }, { "include": "#magic-variable-names" }] }, "magic-variable-names": { "captures": { "1": { "name": "support.variable.magic.python" } }, "comment": "magic variables which a class/module may have.", "match": "(?x)\n\\b(\n__(?:\nall | bases | builtins | class | class_getitem | code | debug\n| defaults | dict | doc | file | func | kwdefaults | members\n| metaclass | methods | module | mro | mro_entries | name\n| qualname | post_init | self | signature | slots | subclasses\n| version | weakref | wrapped | annotations | classcell\n| spec | path | package | future | traceback\n)__\n)\\b\n" }, "member-access": { "begin": "(\\.)\\s*(?!\\.)", "beginCaptures": { "1": { "name": "punctuation.separator.period.python" } }, "end": "(?x)\n\n\n(?<=\\S)(?=\\W) |\n\n\n(^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n$\n", "name": "meta.member.access.python", "patterns": [{ "include": "#function-call" }, { "include": "#member-access-base" }, { "include": "#member-access-attribute" }] }, "member-access-attribute": { "comment": "Highlight attribute access in otherwise non-specialized cases.", "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n", "name": "meta.attribute.python" }, "member-access-base": { "patterns": [{ "include": "#magic-names" }, { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#special-names" }, { "include": "#line-continuation" }, { "include": "#item-access" }, { "include": "#special-variables-types" }] }, "member-access-class": { "begin": "(\\.)\\s*(?!\\.)", "beginCaptures": { "1": { "name": "punctuation.separator.period.python" } }, "end": "(?<=\\S)(?=\\W)|$", "name": "meta.member.access.python", "patterns": [{ "include": "#call-wrapper-inheritance" }, { "include": "#member-access-base" }, { "include": "#inheritance-identifier" }] }, "number": { "name": "constant.numeric.python", "patterns": [{ "include": "#number-float" }, { "include": "#number-dec" }, { "include": "#number-hex" }, { "include": "#number-oct" }, { "include": "#number-bin" }, { "include": "#numb
(
{{ | }}
| (?:
{
\\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'"]+\\])*
(![rsa])?
( : \\w? [<>=^]? [-+ ]? \\#?
\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?
})
)
`, "name": "meta.format.brace.python" }, { "captures": { "1": { "name": "constant.character.format.placeholder.other.python" }, "3": { "name": "storage.type.format.python" }, "4": { "name": "storage.type.format.python" } }, "match": `(?x)
(
{
\\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'"]+\\])*
(![rsa])?
(:)
[^'"{}\\n]* (?:
\\{ [^'"}\\n]*? \\} [^'"{}\\n]*
)*
}
)
`, "name": "meta.format.brace.python" }] }, "string-consume-escape": { "match": `\\\\['"\\n\\\\]` }, "string-entity": { "patterns": [{ "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#string-formatting" }] }, "string-formatting": { "captures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "match": "(?x)\n(\n% (\\([\\w\\s]*\\))?\n[-+#0 ]*\n(\\d+|\\*)? (\\.(\\d+|\\*))?\n([hlL])?\n[diouxXeEfFgGcrsab%]\n)\n", "name": "meta.format.percent.python" }, "string-line-continuation": { "match": "\\\\$", "name": "constant.language.python" }, "string-multi-bad-brace1-formatting-raw": { "begin": `(?x)
(?= \\{%
( .*? (?!'''|""") )
%\\}
)
`, "comment": "template using {% ... %}", "end": `(?='''|""")`, "patterns": [{ "include": "#string-consume-escape" }] }, "string-multi-bad-brace1-formatting-unicode": { "begin": `(?x)
(?= \\{%
( .*? (?!'''|""") )
%\\}
)
`, "comment": "template using {% ... %}", "end": `(?='''|""")`, "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }] }, "string-multi-bad-brace2-formatting-raw": { "begin": `(?x)
(?!\\{\\{)
(?= \\{ (
\\w*? (?!'''|""") [^!:\\.\\[}\\w]
)
.*?(?!'''|""")
\\}
)
`, "comment": "odd format or format-like syntax", "end": `(?='''|""")`, "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }] }, "string-multi-bad-brace2-formatting-unicode": { "begin": `(?x)
(?!\\{\\{)
(?= \\{ (
\\w*? (?!'''|""") [^!:\\.\\[}\\w]
)
.*?(?!'''|""")
\\}
)
`, "comment": "odd format or format-like syntax", "end": `(?='''|""")`, "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }] }, "string-quoted-multi-line": { "begin": `(?:\\b([rR])(?=[uU]))?([uU])?('''|""")`, "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\3)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.multi.python", "patterns": [{ "include": "#string-multi-bad-brace1-formatting-unicode" }, { "include": "#string-multi-bad-brace2-formatting-unicode" }, { "include": "#string-unicode-guts" }] }, "string-quoted-single-line": { "begin": `(?:\\b([rR])(?=[uU]))?([uU])?((['"]))`, "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\3)|((?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.single.python", "patterns": [{ "include": "#string-single-bad-brace1-formatting-unicode" }, { "include": "#string-single-bad-brace2-formatting-unicode" }, { "include": "#string-unicode-guts" }] }, "string-raw-bin-guts": { "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }] }, "string-raw-bin-quoted-multi-line": { "begin": `(\\b(?:R[bB]|[bB]R))('''|""")`, "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\2)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.raw.binary.multi.python", "patterns": [{ "include": "#string-raw-bin-guts" }] }, "string-raw-bin-quoted-single-line": { "begin": `(\\b(?:R[bB]|[bB]R))((['"]))`, "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\2)|((?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.raw.binary.single.python", "patterns": [{ "include": "#string-raw-bin-guts" }] }, "string-raw-guts": { "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }, { "include": "#string-brace-formatting" }] }, "string-raw-quoted-multi-line": { "begin": `\\b(([uU]R)|(R))('''|""")`, "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\4)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.raw.multi.python", "patterns": [{ "include": "#string-multi-bad-brace1-formatting-raw" }, { "include": "#string-multi-bad-brace2-formatting-raw" }, { "include": "#string-raw-guts" }] }, "string-raw-quoted-single-line": { "begin": `\\b(([uU]R)|(R))((['"]))`, "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "punctuation.definition.string.begin.python" } }, "end": "(\\4)|((?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "string.quoted.raw.single.python", "patterns": [{ "include": "#string-single-bad-brace1-formatting-raw" }, { "include": "#string-single-bad-brace2-formatting-raw" }, { "include": "#string-raw-guts" }] }, "string-single-bad-brace1-formatting-raw": { "begin": `(?x)
(?= \\{%
( .*? (?!(['"])|((?<!\\\\)\\n)) )
%\\}
)
`, "comment": "template using {% ... %}", "end": `(?=(['"])|((?<!\\\\)\\n))`, "patterns": [{ "include": "#string-consume-escape" }] }, "string-single-bad-brace1-formatting-unicode": { "begin": `(?x)
(?= \\{%
( .*? (?!(['"])|((?<!\\\\)\\n)) )
%\\}
)
`, "comment": "template using {% ... %}", "end": `(?=(['"])|((?<!\\\\)\\n))`, "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }] }, "string-single-bad-brace2-formatting-raw": { "begin": `(?x)
(?!\\{\\{)
(?= \\{ (
\\w*? (?!(['"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]
)
.*?(?!(['"])|((?<!\\\\)\\n))
\\}
)
`, "comment": "odd format or format-like syntax", "end": `(?=(['"])|((?<!\\\\)\\n))`, "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }] }, "string-single-bad-brace2-formatting-unicode": { "begin": `(?x)
(?!\\{\\{)
(?= \\{ (
\\w*? (?!(['"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]
)
.*?(?!(['"])|((?<!\\\\)\\n))
\\}
)
`, "comment": "odd format or format-like syntax", "end": `(?=(['"])|((?<!\\\\)\\n))`, "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }] }, "string-unicode-guts": { "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }, { "include": "#string-brace-formatting" }] } }, "scopeName": "source.vyper", "aliases": ["vy"] });
var vyper = [
lang
];
export { vyper as default };