diff --git a/.gitignore b/.gitignore
index e17b261b..a0b06542 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
node_modules
-.DS_Store
*.cache
*.pyc
-package-lock.json
+*.vsix
diff --git a/.vscodeignore b/.vscodeignore
new file mode 100644
index 00000000..9138fb54
--- /dev/null
+++ b/.vscodeignore
@@ -0,0 +1,11 @@
+.github/**
+**/src/**
+**/.gitignore
+**/.yarnrc
+**/.**
+**/*.py
+misc/**
+settings/**
+snippets/**
+test/**
+Makefile
diff --git a/grammars/MagicPython.cson b/grammars/MagicPython.cson
index 6486dba4..a41fb48a 100644
--- a/grammars/MagicPython.cson
+++ b/grammars/MagicPython.cson
@@ -294,6 +294,23 @@ repository:
'''
}
+ {
+ name: "keyword.control.flow.python"
+ comment: '''
+ `match` and `case` are only soft keywords. Match if
+ followed by `:` or anything that allows for line continuation.
+
+ '''
+ match: '''
+ (?x)
+ (?:^\\s*)\\b(
+ match | case
+ )\\b(?:
+ (?=.*[:\\\\]) | (?=\\s*[\\(\\[\\{])
+ )
+
+ '''
+ }
{
name: "storage.modifier.declaration.python"
match: '''
@@ -619,6 +636,8 @@ repository:
| (!= | == | >= | <= | < | >) (?# 5)
+ | (:=) (?# 6)
+
'''
captures:
"1":
@@ -631,6 +650,8 @@ repository:
name: "keyword.operator.arithmetic.python"
"5":
name: "keyword.operator.comparison.python"
+ "6":
+ name: "keyword.operator.assignment.python"
punctuation:
patterns: [
{
@@ -781,18 +802,6 @@ repository:
{
include: "#regexp-double-one-line"
}
- {
- include: "#fregexp-single-three-line"
- }
- {
- include: "#fregexp-double-three-line"
- }
- {
- include: "#fregexp-single-one-line"
- }
- {
- include: "#fregexp-double-one-line"
- }
]
string:
patterns: [
@@ -1255,6 +1264,10 @@ repository:
name: "punctuation.section.function.lambda.begin.python"
contentName: "meta.function.lambda.parameters.python"
patterns: [
+ {
+ name: "keyword.operator.positional.parameter.python"
+ match: "/"
+ }
{
name: "keyword.operator.unpacking.parameter.python"
match: "(\\*\\*|\\*)"
@@ -1402,6 +1415,10 @@ repository:
"1":
name: "punctuation.definition.parameters.end.python"
patterns: [
+ {
+ name: "keyword.operator.positional.parameter.python"
+ match: "/"
+ }
{
name: "keyword.operator.unpacking.parameter.python"
match: "(\\*\\*|\\*)"
@@ -3322,1158 +3339,264 @@ repository:
include: "#double-three-regexp-expression"
}
]
- "single-one-fregexp-expression":
+ "string-raw-quoted-single-line":
+ name: "string.quoted.raw.single.python"
+ begin: "\\b(([uU]R)|(R))((['\"]))"
+ end: "(\\4)|((?)
+ (?!\\{\\{)
+ (?= \\{ (
+ \\w*? (?!(['"])|((?)
-
- '''
- end: "(\\)|(?=\\'\\'\\'))"
- beginCaptures:
- "1":
- name: "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
- "2":
- name: "entity.name.tag.named.group.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#single-three-fregexp-expression"
- }
- {
- include: "#comments-string-single-three"
- }
- ]
- "single-three-fregexp-lookahead":
- begin: "(\\()\\?="
- end: "(\\)|(?=\\'\\'\\'))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookahead.regexp"
- "1":
- name: "punctuation.parenthesis.lookahead.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#single-three-fregexp-expression"
- }
- {
- include: "#comments-string-single-three"
- }
- ]
- "single-three-fregexp-lookahead-negative":
- begin: "(\\()\\?!"
- end: "(\\)|(?=\\'\\'\\'))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookahead.negative.regexp"
- "1":
- name: "punctuation.parenthesis.lookahead.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#single-three-fregexp-expression"
- }
- {
- include: "#comments-string-single-three"
- }
- ]
- "single-three-fregexp-lookbehind":
- begin: "(\\()\\?<="
- end: "(\\)|(?=\\'\\'\\'))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookbehind.regexp"
- "1":
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#single-three-fregexp-expression"
- }
- {
- include: "#comments-string-single-three"
- }
- ]
- "single-three-fregexp-lookbehind-negative":
- begin: "(\\()\\?)
-
- '''
- end: "(\\)|(?=\"))|((?=(?)
-
- '''
- end: "(\\)|(?=\"\"\"))"
- beginCaptures:
- "1":
- name: "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
- "2":
- name: "entity.name.tag.named.group.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#double-three-fregexp-expression"
- }
- {
- include: "#comments-string-double-three"
- }
- ]
- "double-three-fregexp-lookahead":
- begin: "(\\()\\?="
- end: "(\\)|(?=\"\"\"))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookahead.regexp"
- "1":
- name: "punctuation.parenthesis.lookahead.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#double-three-fregexp-expression"
- }
- {
- include: "#comments-string-double-three"
- }
- ]
- "double-three-fregexp-lookahead-negative":
- begin: "(\\()\\?!"
- end: "(\\)|(?=\"\"\"))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookahead.negative.regexp"
- "1":
- name: "punctuation.parenthesis.lookahead.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#double-three-fregexp-expression"
- }
- {
- include: "#comments-string-double-three"
- }
- ]
- "double-three-fregexp-lookbehind":
- begin: "(\\()\\?<="
- end: "(\\)|(?=\"\"\"))"
- beginCaptures:
- "0":
- name: "keyword.operator.lookbehind.regexp"
- "1":
- name: "punctuation.parenthesis.lookbehind.begin.regexp"
- endCaptures:
- "1":
- name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
- "2":
- name: "invalid.illegal.newline.python"
- patterns: [
- {
- include: "#double-three-fregexp-expression"
- }
- {
- include: "#comments-string-double-three"
- }
- ]
- "double-three-fregexp-lookbehind-negative":
- begin: "(\\()\\?=^]? [-+ ]? \\#?
\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})
@@ -4741,7 +3868,7 @@ repository:
}
]
"fstring-terminator-single-tail":
- begin: "(![rsa])?(:)(?=.*?{)"
+ begin: "((?:=?)(?:![rsa])?)(:)(?=.*?{)"
end: "(?=})|(?=\\n)"
beginCaptures:
"1":
@@ -4850,7 +3977,7 @@ repository:
]
"fstring-raw-quoted-multi-line":
name: "meta.fstring.python"
- begin: "(\\b(?:[R][fF]|[fF][R]))('''|\"\"\")"
+ begin: "(\\b(?:[rR][fF]|[fF][rR]))('''|\"\"\")"
end: "(\\2)"
beginCaptures:
"1":
@@ -4944,12 +4071,16 @@ repository:
patterns: [
{
name: "storage.type.format.python"
- match: "(![rsa])(?=})"
+ match: "(=(![rsa])?)(?=})"
+ }
+ {
+ name: "storage.type.format.python"
+ match: "(=?![rsa])(?=})"
}
{
match: '''
(?x)
- (![rsa])?
+ ( (?: =?) (?: ![rsa])? )
( : \\w? [<>=^]? [-+ ]? \\#?
\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})
@@ -4965,7 +4096,7 @@ repository:
}
]
"fstring-terminator-multi-tail":
- begin: "(![rsa])?(:)(?=.*?{)"
+ begin: "((?:=?)(?:![rsa])?)(:)(?=.*?{)"
end: "(?=})"
beginCaptures:
"1":
diff --git a/grammars/MagicPython.tmLanguage b/grammars/MagicPython.tmLanguage
index 5a07f545..6664d593 100644
--- a/grammars/MagicPython.tmLanguage
+++ b/grammars/MagicPython.tmLanguage
@@ -453,6 +453,22 @@ it's probably control flow like:
| from | elif | else | if | except | pass | raise
| return | try | while | with
)\b
+
+
+
+ name
+ keyword.control.flow.python
+ comment
+ `match` and `case` are only soft keywords. Match if
+followed by `:` or anything that allows for line continuation.
+
+ match
+ (?x)
+ (?:^\s*)\b(
+ match | case
+ )\b(?:
+ (?=.*[:\\]) | (?=\s*[\(\[\{])
+ )
@@ -933,6 +949,8 @@ E.g. "arr[idx](args)"
| (\*\* | \* | \+ | - | % | // | / | @) (?# 4)
| (!= | == | >= | <= | < | >) (?# 5)
+
+ | (:=) (?# 6)
captures
@@ -961,6 +979,11 @@ E.g. "arr[idx](args)"
name
keyword.operator.comparison.python
+ 6
+
+ name
+ keyword.operator.assignment.python
+
punctuation
@@ -1190,22 +1213,6 @@ E.g. "arr[idx](args)"
include
#regexp-double-one-line
-
- include
- #fregexp-single-three-line
-
-
- include
- #fregexp-double-three-line
-
-
- include
- #fregexp-single-one-line
-
-
- include
- #fregexp-double-one-line
-
string
@@ -1936,6 +1943,12 @@ E.g. "arr[idx](args)"
meta.function.lambda.parameters.python
patterns
+
+ name
+ keyword.operator.positional.parameter.python
+ match
+ /
+
name
keyword.operator.unpacking.parameter.python
@@ -2184,6 +2197,12 @@ correctly identify the "in" as a control flow keyword.
patterns
+
+ name
+ keyword.operator.positional.parameter.python
+ match
+ /
+
name
keyword.operator.unpacking.parameter.python
@@ -5627,85 +5646,30 @@ indirectly through syntactic constructs
- single-one-fregexp-expression
-
- patterns
-
-
- include
- #fregexp-base-expression
-
-
- include
- #single-one-regexp-character-set
-
-
- include
- #single-one-regexp-comments
-
-
- include
- #regexp-flags
-
-
- include
- #single-one-regexp-named-group
-
-
- include
- #regexp-backreference
-
-
- include
- #single-one-fregexp-lookahead
-
-
- include
- #single-one-fregexp-lookahead-negative
-
-
- include
- #single-one-fregexp-lookbehind
-
-
- include
- #single-one-fregexp-lookbehind-negative
-
-
- include
- #single-one-fregexp-conditional
-
-
- include
- #single-one-fregexp-parentheses-non-capturing
-
-
- include
- #single-one-fregexp-parentheses
-
-
-
- single-one-fregexp-named-group
+ string-raw-quoted-single-line
name
- meta.named.regexp
+ string.quoted.raw.single.python
begin
- (?x)
- (\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
-
+ \b(([uU]R)|(R))((['"]))
end
- (\)|(?=\'))|((?=(?<!\\)\n))
+ (\4)|((?<!\\)\n)
beginCaptures
- 1
+ 2
name
- support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp
+ invalid.deprecated.prefix.python
- 2
+ 3
name
- entity.name.tag.named.group.regexp
+ storage.type.string.python
+
+ 4
+
+ name
+ punctuation.definition.string.begin.python
endCaptures
@@ -5713,7 +5677,7 @@ indirectly through syntactic constructs
1
name
- support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp
+ punctuation.definition.string.end.python
2
@@ -5725,27 +5689,37 @@ indirectly through syntactic constructs
include
- #single-one-fregexp-expression
+ #string-single-bad-brace1-formatting-raw
+
+
+ include
+ #string-single-bad-brace2-formatting-raw
+
+
+ include
+ #string-raw-guts
- single-one-fregexp-lookahead
+ string-bin-quoted-single-line
+ name
+ string.quoted.binary.single.python
begin
- (\()\?=
+ (\b[bB])((['"]))
end
- (\)|(?=\'))|((?=(?<!\\)\n))
+ (\2)|((?<!\\)\n)
beginCaptures
- 0
+ 1
name
- keyword.operator.lookahead.regexp
+ storage.type.string.python
- 1
+ 2
name
- punctuation.parenthesis.lookahead.begin.regexp
+ punctuation.definition.string.begin.python
endCaptures
@@ -5753,7 +5727,7 @@ indirectly through syntactic constructs
1
name
- keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp
+ punctuation.definition.string.end.python
2
@@ -5765,27 +5739,29 @@ indirectly through syntactic constructs
include
- #single-one-fregexp-expression
+ #string-entity
- single-one-fregexp-lookahead-negative
+ string-raw-bin-quoted-single-line
+ name
+ string.quoted.raw.binary.single.python
begin
- (\()\?!
+ (\b(?:R[bB]|[bB]R))((['"]))
end
- (\)|(?=\'))|((?=(?<!\\)\n))
+ (\2)|((?<!\\)\n)
beginCaptures
- 0
+ 1
name
- keyword.operator.lookahead.negative.regexp
+ storage.type.string.python
- 1
+ 2
name
- punctuation.parenthesis.lookahead.begin.regexp
+ punctuation.definition.string.begin.python
endCaptures
@@ -5793,7 +5769,7 @@ indirectly through syntactic constructs
1
name
- keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp
+ punctuation.definition.string.end.python
2
@@ -5805,27 +5781,34 @@ indirectly through syntactic constructs
include
- #single-one-fregexp-expression
+ #string-raw-bin-guts
- single-one-fregexp-lookbehind
+ string-quoted-single-line
+ name
+ string.quoted.single.python
begin
- (\()\?<=
+ (?:\b([rR])(?=[uU]))?([uU])?((['"]))
end
- (\)|(?=\'))|((?=(?<!\\)\n))
+ (\3)|((?<!\\)\n)
beginCaptures
- 0
+ 1
name
- keyword.operator.lookbehind.regexp
+ invalid.illegal.prefix.python
- 1
+ 2
name
- punctuation.parenthesis.lookbehind.begin.regexp
+ storage.type.string.python
+
+ 3
+
+ name
+ punctuation.definition.string.begin.python
endCaptures
@@ -5833,7 +5816,7 @@ indirectly through syntactic constructs
1
name
- keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp
+ punctuation.definition.string.end.python
2
@@ -5845,1814 +5828,82 @@ indirectly through syntactic constructs
include
- #single-one-fregexp-expression
+ #string-single-bad-brace1-formatting-unicode
+
+
+ include
+ #string-single-bad-brace2-formatting-unicode
+
+
+ include
+ #string-unicode-guts
- single-one-fregexp-lookbehind-negative
+ string-single-bad-brace1-formatting-unicode
+ comment
+ template using {% ... %}
begin
- (\()\?<!
+ (?x)
+ (?= \{%
+ ( .*? (?!(['"])|((?<!\\)\n)) )
+ %\}
+ )
+
end
- (\)|(?=\'))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- keyword.operator.lookbehind.negative.regexp
-
- 1
+ (?=(['"])|((?<!\\)\n))
+ patterns
+
- name
- punctuation.parenthesis.lookbehind.begin.regexp
+ include
+ #escape-sequence-unicode
-
- endCaptures
-
- 1
- name
- keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp
+ include
+ #escape-sequence
- 2
- name
- invalid.illegal.newline.python
+ include
+ #string-line-continuation
-
+
+
+ string-single-bad-brace1-formatting-raw
+
+ comment
+ template using {% ... %}
+ begin
+ (?x)
+ (?= \{%
+ ( .*? (?!(['"])|((?<!\\)\n)) )
+ %\}
+ )
+
+ end
+ (?=(['"])|((?<!\\)\n))
patterns
include
- #single-one-fregexp-expression
+ #string-consume-escape
- single-one-fregexp-conditional
+ string-single-bad-brace2-formatting-unicode
+ comment
+ odd format or format-like syntax
begin
- (\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)
- end
- (\)|(?=\'))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- keyword.operator.conditional.regexp
-
- 1
-
- name
- punctuation.parenthesis.conditional.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-one-fregexp-expression
-
-
-
- single-one-fregexp-parentheses-non-capturing
-
- begin
- \(\?:
- end
- (\)|(?=\'))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-one-fregexp-expression
-
-
-
- single-one-fregexp-parentheses
-
- begin
- \(
- end
- (\)|(?=\'))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-one-fregexp-expression
-
-
-
- single-three-fregexp-expression
-
- patterns
-
-
- include
- #fregexp-base-expression
-
-
- include
- #single-three-regexp-character-set
-
-
- include
- #single-three-regexp-comments
-
-
- include
- #regexp-flags
-
-
- include
- #single-three-regexp-named-group
-
-
- include
- #regexp-backreference
-
-
- include
- #single-three-fregexp-lookahead
-
-
- include
- #single-three-fregexp-lookahead-negative
-
-
- include
- #single-three-fregexp-lookbehind
-
-
- include
- #single-three-fregexp-lookbehind-negative
-
-
- include
- #single-three-fregexp-conditional
-
-
- include
- #single-three-fregexp-parentheses-non-capturing
-
-
- include
- #single-three-fregexp-parentheses
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-named-group
-
- name
- meta.named.regexp
- begin
- (?x)
- (\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
-
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-lookahead
-
- begin
- (\()\?=
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-lookahead-negative
-
- begin
- (\()\?!
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-lookbehind
-
- begin
- (\()\?<=
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-lookbehind-negative
-
- begin
- (\()\?<!
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 0
-
- name
- keyword.operator.lookbehind.negative.regexp
-
- 1
-
- name
- punctuation.parenthesis.lookbehind.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-conditional
-
- begin
- (\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 0
-
- name
- keyword.operator.conditional.regexp
-
- 1
-
- name
- punctuation.parenthesis.conditional.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-parentheses-non-capturing
-
- begin
- \(\?:
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- single-three-fregexp-parentheses
-
- begin
- \(
- end
- (\)|(?=\'\'\'))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
- include
- #comments-string-single-three
-
-
-
- double-one-fregexp-expression
-
- patterns
-
-
- include
- #fregexp-base-expression
-
-
- include
- #double-one-regexp-character-set
-
-
- include
- #double-one-regexp-comments
-
-
- include
- #regexp-flags
-
-
- include
- #double-one-regexp-named-group
-
-
- include
- #regexp-backreference
-
-
- include
- #double-one-fregexp-lookahead
-
-
- include
- #double-one-fregexp-lookahead-negative
-
-
- include
- #double-one-fregexp-lookbehind
-
-
- include
- #double-one-fregexp-lookbehind-negative
-
-
- include
- #double-one-fregexp-conditional
-
-
- include
- #double-one-fregexp-parentheses-non-capturing
-
-
- include
- #double-one-fregexp-parentheses
-
-
-
- double-one-fregexp-named-group
-
- name
- meta.named.regexp
- begin
- (?x)
- (\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
-
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-lookahead
-
- begin
- (\()\?=
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-lookahead-negative
-
- begin
- (\()\?!
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-lookbehind
-
- begin
- (\()\?<=
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-lookbehind-negative
-
- begin
- (\()\?<!
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- keyword.operator.lookbehind.negative.regexp
-
- 1
-
- name
- punctuation.parenthesis.lookbehind.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-conditional
-
- begin
- (\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- keyword.operator.conditional.regexp
-
- 1
-
- name
- punctuation.parenthesis.conditional.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-parentheses-non-capturing
-
- begin
- \(\?:
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-one-fregexp-parentheses
-
- begin
- \(
- end
- (\)|(?="))|((?=(?<!\\)\n))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- double-three-fregexp-expression
-
- patterns
-
-
- include
- #fregexp-base-expression
-
-
- include
- #double-three-regexp-character-set
-
-
- include
- #double-three-regexp-comments
-
-
- include
- #regexp-flags
-
-
- include
- #double-three-regexp-named-group
-
-
- include
- #regexp-backreference
-
-
- include
- #double-three-fregexp-lookahead
-
-
- include
- #double-three-fregexp-lookahead-negative
-
-
- include
- #double-three-fregexp-lookbehind
-
-
- include
- #double-three-fregexp-lookbehind-negative
-
-
- include
- #double-three-fregexp-conditional
-
-
- include
- #double-three-fregexp-parentheses-non-capturing
-
-
- include
- #double-three-fregexp-parentheses
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-named-group
-
- name
- meta.named.regexp
- begin
- (?x)
- (\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
-
- end
- (\)|(?="""))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-lookahead
-
- begin
- (\()\?=
- end
- (\)|(?="""))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-lookahead-negative
-
- begin
- (\()\?!
- end
- (\)|(?="""))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-lookbehind
-
- begin
- (\()\?<=
- end
- (\)|(?="""))
- beginCaptures
-
- 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
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-lookbehind-negative
-
- begin
- (\()\?<!
- end
- (\)|(?="""))
- beginCaptures
-
- 0
-
- name
- keyword.operator.lookbehind.negative.regexp
-
- 1
-
- name
- punctuation.parenthesis.lookbehind.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-conditional
-
- begin
- (\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)
- end
- (\)|(?="""))
- beginCaptures
-
- 0
-
- name
- keyword.operator.conditional.regexp
-
- 1
-
- name
- punctuation.parenthesis.conditional.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-parentheses-non-capturing
-
- begin
- \(\?:
- end
- (\)|(?="""))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- double-three-fregexp-parentheses
-
- begin
- \(
- end
- (\)|(?="""))
- beginCaptures
-
- 0
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp
-
-
- endCaptures
-
- 1
-
- name
- support.other.parenthesis.regexp punctuation.parenthesis.end.regexp
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
- include
- #comments-string-double-three
-
-
-
- fregexp-single-one-line
-
- name
- string.interpolated.python string.regexp.quoted.single.python
- begin
- \b(([uU]r)|([fF]r)|(r[fF]?))(\')
- end
- (\')|(?<!\\)(\n)
- 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
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-one-fregexp-expression
-
-
-
- fregexp-single-three-line
-
- name
- string.interpolated.python string.regexp.quoted.multi.python
- begin
- \b(([uU]r)|([fF]r)|(r[fF]?))(\'\'\')
- end
- (\'\'\')
- 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
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #single-three-fregexp-expression
-
-
-
- fregexp-double-one-line
-
- name
- string.interpolated.python string.regexp.quoted.single.python
- begin
- \b(([uU]r)|([fF]r)|(r[fF]?))(")
- end
- (")|(?<!\\)(\n)
- 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
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-one-fregexp-expression
-
-
-
- fregexp-double-three-line
-
- name
- string.interpolated.python string.regexp.quoted.multi.python
- begin
- \b(([uU]r)|([fF]r)|(r[fF]?))(""")
- end
- (""")
- 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
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #double-three-fregexp-expression
-
-
-
- string-raw-quoted-single-line
-
- name
- string.quoted.raw.single.python
- begin
- \b(([uU]R)|(R))((['"]))
- end
- (\4)|((?<!\\)\n)
- beginCaptures
-
- 2
-
- name
- invalid.deprecated.prefix.python
-
- 3
-
- name
- storage.type.string.python
-
- 4
-
- name
- punctuation.definition.string.begin.python
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #string-single-bad-brace1-formatting-raw
-
-
- include
- #string-single-bad-brace2-formatting-raw
-
-
- include
- #string-raw-guts
-
-
-
- string-bin-quoted-single-line
-
- name
- string.quoted.binary.single.python
- begin
- (\b[bB])((['"]))
- end
- (\2)|((?<!\\)\n)
- beginCaptures
-
- 1
-
- name
- storage.type.string.python
-
- 2
-
- name
- punctuation.definition.string.begin.python
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #string-entity
-
-
-
- string-raw-bin-quoted-single-line
-
- name
- string.quoted.raw.binary.single.python
- begin
- (\b(?:R[bB]|[bB]R))((['"]))
- end
- (\2)|((?<!\\)\n)
- beginCaptures
-
- 1
-
- name
- storage.type.string.python
-
- 2
-
- name
- punctuation.definition.string.begin.python
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #string-raw-bin-guts
-
-
-
- string-quoted-single-line
-
- name
- string.quoted.single.python
- begin
- (?:\b([rR])(?=[uU]))?([uU])?((['"]))
- end
- (\3)|((?<!\\)\n)
- beginCaptures
-
- 1
-
- name
- invalid.illegal.prefix.python
-
- 2
-
- name
- storage.type.string.python
-
- 3
-
- name
- punctuation.definition.string.begin.python
-
-
- endCaptures
-
- 1
-
- name
- punctuation.definition.string.end.python
-
- 2
-
- name
- invalid.illegal.newline.python
-
-
- patterns
-
-
- include
- #string-single-bad-brace1-formatting-unicode
-
-
- include
- #string-single-bad-brace2-formatting-unicode
-
-
- include
- #string-unicode-guts
-
-
-
- string-single-bad-brace1-formatting-unicode
-
- comment
- template using {% ... %}
- begin
- (?x)
- (?= \{%
- ( .*? (?!(['"])|((?<!\\)\n)) )
- %\}
- )
-
- end
- (?=(['"])|((?<!\\)\n))
- patterns
-
-
- include
- #escape-sequence-unicode
-
-
- include
- #escape-sequence
-
-
- include
- #string-line-continuation
-
-
-
- string-single-bad-brace1-formatting-raw
-
- comment
- template using {% ... %}
- begin
- (?x)
- (?= \{%
- ( .*? (?!(['"])|((?<!\\)\n)) )
- %\}
- )
-
- end
- (?=(['"])|((?<!\\)\n))
- patterns
-
-
- include
- #string-consume-escape
-
-
-
- string-single-bad-brace2-formatting-unicode
-
- comment
- odd format or format-like syntax
- begin
- (?x)
- (?!\{\{)
- (?= \{ (
- \w*? (?!(['"])|((?<!\\)\n)) [^!:\.\[}\w]
- )
- .*?(?!(['"])|((?<!\\)\n))
- \}
- )
-
+ (?x)
+ (?!\{\{)
+ (?= \{ (
+ \w*? (?!(['"])|((?<!\\)\n)) [^!:\.\[}\w]
+ )
+ .*?(?!(['"])|((?<!\\)\n))
+ \}
+ )
+
end
(?=(['"])|((?<!\\)\n))
patterns
@@ -8118,7 +6369,7 @@ indirectly through syntactic constructs
name
meta.fstring.python
begin
- (\b(?:[R][fF]|[fF][R]))((['"]))
+ (\b(?:[rR][fF]|[fF][rR]))((['"]))
end
(\2)|((?<!\\)\n)
beginCaptures
@@ -8259,12 +6510,18 @@ indirectly through syntactic constructs
name
storage.type.format.python
match
- (![rsa])(?=})
+ (=(![rsa])?)(?=})
+
+
+ name
+ storage.type.format.python
+ match
+ (=?![rsa])(?=})
match
(?x)
- (![rsa])?
+ ( (?: =?) (?: ![rsa])? )
( : \w? [<>=^]? [-+ ]? \#?
\d* ,? (\.\d+)? [bcdeEfFgGnosxX%]? )(?=})
@@ -8291,7 +6548,7 @@ indirectly through syntactic constructs
fstring-terminator-single-tail
begin
- (![rsa])?(:)(?=.*?{)
+ ((?:=?)(?:![rsa])?)(:)(?=.*?{)
end
(?=})|(?=\n)
beginCaptures
@@ -8490,7 +6747,7 @@ indirectly through syntactic constructs
name
meta.fstring.python
begin
- (\b(?:[R][fF]|[fF][R]))('''|""")
+ (\b(?:[rR][fF]|[fF][rR]))('''|""")
end
(\2)
beginCaptures
@@ -8631,12 +6888,18 @@ indirectly through syntactic constructs
name
storage.type.format.python
match
- (![rsa])(?=})
+ (=(![rsa])?)(?=})
+
+
+ name
+ storage.type.format.python
+ match
+ (=?![rsa])(?=})
match
(?x)
- (![rsa])?
+ ( (?: =?) (?: ![rsa])? )
( : \w? [<>=^]? [-+ ]? \#?
\d* ,? (\.\d+)? [bcdeEfFgGnosxX%]? )(?=})
@@ -8663,7 +6926,7 @@ indirectly through syntactic constructs
fstring-terminator-multi-tail
begin
- (![rsa])?(:)(?=.*?{)
+ ((?:=?)(?:![rsa])?)(:)(?=.*?{)
end
(?=})
beginCaptures
diff --git a/grammars/src/MagicPython.syntax.yaml b/grammars/src/MagicPython.syntax.yaml
index 9c80c8b3..6a162767 100644
--- a/grammars/src/MagicPython.syntax.yaml
+++ b/grammars/src/MagicPython.syntax.yaml
@@ -103,82 +103,6 @@ repository:
bquote: '(""")'
equote: '(""")'
- - file: 'regexp.inc.syntax.yaml'
- vars:
- prefix: 'single-one-'
- basename: 'fregexp'
- marker: "|(?=\\')"
- nested: ''
- guard: "|((?=(?= | <= | < | >) (?# 5)
+ | (:=) (?# 6)
+
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}
punctuation:
patterns:
@@ -697,10 +635,6 @@ repository:
- include: '#regexp-double-three-line'
- include: '#regexp-single-one-line'
- include: '#regexp-double-one-line'
- - include: '#fregexp-single-three-line'
- - include: '#fregexp-double-three-line'
- - include: '#fregexp-single-one-line'
- - include: '#fregexp-double-one-line'
string:
patterns:
@@ -1002,6 +936,8 @@ repository:
contentName: meta.function.lambda.parameters.python
patterns:
+ - name: keyword.operator.positional.parameter.python
+ match: /
- name: keyword.operator.unpacking.parameter.python
match: (\*\*|\*)
- include: '#lambda-nested-incomplete'
@@ -1096,6 +1032,8 @@ repository:
'1': {name: punctuation.definition.parameters.end.python}
patterns:
+ - name: keyword.operator.positional.parameter.python
+ match: /
- name: keyword.operator.unpacking.parameter.python
match: (\*\*|\*)
- include: '#lambda-incomplete'
diff --git a/grammars/src/pyfstring.inc.syntax.yaml b/grammars/src/pyfstring.inc.syntax.yaml
index 993707cf..0a23fc24 100644
--- a/grammars/src/pyfstring.inc.syntax.yaml
+++ b/grammars/src/pyfstring.inc.syntax.yaml
@@ -51,7 +51,7 @@ fstring-normf-quoted-${line}-line:
fstring-raw-quoted-${line}-line:
name: meta.fstring.python
- begin: (\b(?:[R][fF]|[fF][R]))(${marker})
+ begin: (\b(?:[rR][fF]|[fF][rR]))(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python
@@ -127,10 +127,12 @@ fstring-${line}-brace:
fstring-terminator-${line}:
patterns:
- name: storage.type.format.python
- match: (![rsa])(?=})
+ match: (=(![rsa])?)(?=})
+ - name: storage.type.format.python
+ match: (=?![rsa])(?=})
- match: |
(?x)
- (![rsa])?
+ ( (?: =?) (?: ![rsa])? )
( : \w? [<>=^]? [-+ ]? \#?
\d* ,? (\.\d+)? [bcdeEfFgGnosxX%]? )(?=})
captures:
@@ -148,7 +150,7 @@ fstring-terminator-${line}:
- include: '#fstring-terminator-${line}-tail'
fstring-terminator-${line}-tail:
- begin: (![rsa])?(:)(?=.*?{)
+ begin: ((?:=?)(?:![rsa])?)(:)(?=.*?{)
end: (?=})${fguard}
beginCaptures:
'1': {name: storage.type.format.python}
diff --git a/misc/example.py b/misc/example.py
index 6b820e63..718f3074 100644
--- a/misc/example.py
+++ b/misc/example.py
@@ -1,7 +1,7 @@
import asyncio
-def showcase():
+def showcase(a, b, /, c, d, *, e, f):
"""Some code to showcase the syntax.
Docstrings are recognized and have an additional scope.
@@ -21,7 +21,9 @@ async def coroutine(db:aio_db.DatabaseConnection) -> List[str]:
async with db.transaction():
result = await db.query(...)
- print(f'Result: {result!r}')
+ print(f'Result: {result!r} {a=} {b=!r}')
+ print(Rf'data: {c=}')
+ print(rf'data: {c=}')
mapping = None # type: Dict[int, Any] # PEP 484
@@ -41,8 +43,14 @@ async def coroutine(db:aio_db.DatabaseConnection) -> List[str]:
# NOTE Numbers with leading zeros are invalid in Python 3,
# use 0o...
answer = func(0xdeadbeef + 0b00100001 + 0123 + 0o123 +
- 1_005_123 + # PEP 515
+ 1_005_123 + # PEP 515
# complex numbers
.10e12 + 2j) @ mat
+ # walrus operator
+ filtered_data = [y for x in data if (y := f(x)) is not None]
+
+ # position-only params
+ bar = lambda q, w, /, e, r: (q + w + e + r)
+
return R'''No escapes '\' in this \one'''
diff --git a/misc/scopes b/misc/scopes
index 12785af1..8eec651e 100644
--- a/misc/scopes
+++ b/misc/scopes
@@ -56,6 +56,7 @@ keyword.operator.lookahead.regexp
keyword.operator.lookbehind.negative.regexp
keyword.operator.lookbehind.regexp
keyword.operator.negation.regexp
+keyword.operator.positional.parameter.python
keyword.operator.python
keyword.operator.quantifier.regexp
keyword.operator.unpacking.arguments.python
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000..b6ca2ca0
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,1801 @@
+{
+ "name": "magicpython",
+ "version": "1.2.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "magicpython",
+ "version": "1.2.0",
+ "license": "MIT",
+ "devDependencies": {
+ "oniguruma": "^7.2.3",
+ "syntaxdev": "^0.1.3"
+ },
+ "engines": {
+ "atom": "*",
+ "node": "*",
+ "vscode": "*"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/async": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
+ "dev": true
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "node_modules/code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/coffee-script": {
+ "version": "1.12.7",
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
+ "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
+ "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)",
+ "dev": true,
+ "bin": {
+ "cake": "bin/cake",
+ "coffee": "bin/coffee"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/cson": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/cson/-/cson-5.1.0.tgz",
+ "integrity": "sha512-hh97pBcNEc24OQn+CBYu1pp9kcEqp3dE0oO52QIoQkDREnZYHUD1YcKcGvHU+k9lgCmIXHslJfGTie58zjhLnA==",
+ "dev": true,
+ "dependencies": {
+ "coffee-script": "^1.12.7",
+ "cson-parser": "^1.3.4",
+ "editions": "^1.3.3",
+ "extract-opts": "^3.3.1",
+ "requirefresh": "^2.1.0",
+ "safefs": "^4.1.0"
+ },
+ "bin": {
+ "cson2json": "bin/cson2json",
+ "json2cson": "bin/json2cson"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/cson-parser": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-1.3.5.tgz",
+ "integrity": "sha512-Pchz4dDkyafUL4V3xBuP9Os8Hu9VU96R+MxuTKh7NR+D866UiWrhBiSLbfuvwApEaJzpXhXTr3iPe4lFtXLzcQ==",
+ "dev": true,
+ "dependencies": {
+ "coffee-script": "^1.10.0"
+ }
+ },
+ "node_modules/d": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
+ "integrity": "sha512-0SdM9V9pd/OXJHoWmTfNPTAeD+lw6ZqHg+isPyBFuJsZLSE0Ygg1cYZ/0l6DrKQXMOqGOu1oWupMoOfoRfMZrQ==",
+ "dev": true,
+ "dependencies": {
+ "es5-ext": "~0.10.2"
+ }
+ },
+ "node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/eachr": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/eachr/-/eachr-3.3.0.tgz",
+ "integrity": "sha512-yKWuGwOE283CTgbEuvqXXusLH4VBXnY2nZbDkeWev+cpAXY6zCIADSPLdvfkAROc0t8S4l07U1fateCdEDuuvg==",
+ "dev": true,
+ "dependencies": {
+ "editions": "^2.2.0",
+ "typechecker": "^4.9.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/eachr/node_modules/editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "dependencies": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/editions": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
+ "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/emissary": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz",
+ "integrity": "sha512-pD6FWNBSlEOzSJDCTcSGVLgNnGw5fnCvvGMdQ/TN43efeXZ/QTq8+hZoK3OOEXPRNjMmSJmeOnEJh+bWT5O8rQ==",
+ "dev": true,
+ "dependencies": {
+ "es6-weak-map": "^0.1.2",
+ "mixto": "1.x",
+ "property-accessors": "^1.1",
+ "underscore-plus": "1.x"
+ }
+ },
+ "node_modules/errlop": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz",
+ "integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/es5-ext": {
+ "version": "0.10.61",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
+ "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "es6-iterator": "^2.0.3",
+ "es6-symbol": "^3.1.3",
+ "next-tick": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/es5-ext/node_modules/d": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+ "dev": true,
+ "dependencies": {
+ "es5-ext": "^0.10.50",
+ "type": "^1.0.1"
+ }
+ },
+ "node_modules/es5-ext/node_modules/es6-iterator": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+ "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
+ "dev": true,
+ "dependencies": {
+ "d": "1",
+ "es5-ext": "^0.10.35",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "node_modules/es5-ext/node_modules/es6-symbol": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+ "dev": true,
+ "dependencies": {
+ "d": "^1.0.1",
+ "ext": "^1.1.2"
+ }
+ },
+ "node_modules/es6-iterator": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz",
+ "integrity": "sha512-6TOmbFM6OPWkTe+bQ3ZuUkvqcWUjAnYjKUCLdbvRsAUz2Pr+fYIibwNXNkLNtIK9PPFbNMZZddaRNkyJhlGJhA==",
+ "dev": true,
+ "dependencies": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.5",
+ "es6-symbol": "~2.0.1"
+ }
+ },
+ "node_modules/es6-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
+ "integrity": "sha512-wjobO4zO8726HVU7mI2OA/B6QszqwHJuKab7gKHVx+uRfVVYGcWJkCIFxV2Madqb9/RUSrhJ/r6hPfG7FsWtow==",
+ "dev": true,
+ "dependencies": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.5"
+ }
+ },
+ "node_modules/es6-weak-map": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz",
+ "integrity": "sha512-P+N5Cd2TXeb7G59euFiM7snORspgbInS29Nbf3KNO2JQp/DyhvMCDWd58nsVAXwYJ6W3Bx7qDdy6QQ3PCJ7jKQ==",
+ "dev": true,
+ "dependencies": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.6",
+ "es6-iterator": "~0.1.3",
+ "es6-symbol": "~2.0.1"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/event-kit": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/event-kit/-/event-kit-2.5.3.tgz",
+ "integrity": "sha512-b7Qi1JNzY4BfAYfnIRanLk0DOD1gdkWHT4GISIn8Q2tAf3LpU8SP2CMwWaq40imYoKWbtN4ZhbSRxvsnikooZQ==",
+ "dev": true
+ },
+ "node_modules/ext": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz",
+ "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==",
+ "dev": true,
+ "dependencies": {
+ "type": "^2.5.0"
+ }
+ },
+ "node_modules/ext/node_modules/type": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz",
+ "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==",
+ "dev": true
+ },
+ "node_modules/extract-opts": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/extract-opts/-/extract-opts-3.4.0.tgz",
+ "integrity": "sha512-M7Y+1cJDkzOWqvGH5F/V2qgkD6+uitW3NV9rQGl+pLSVuXZ4IDDQgxxMeLPKcWUyfypBWczIILiroSuhXG7Ytg==",
+ "dev": true,
+ "dependencies": {
+ "eachr": "^3.2.0",
+ "editions": "^2.2.0",
+ "typechecker": "^4.9.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/extract-opts/node_modules/editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "dependencies": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/first-mate": {
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/first-mate/-/first-mate-7.4.3.tgz",
+ "integrity": "sha512-PtZUpaPmcV5KV4Rw5TfwczEnExN+X1o3Q/G82E4iRJ0tW91fm3Yi7pa5t4cBH8r3D6EyoBKvfpG2jKE+TZ0/nw==",
+ "dev": true,
+ "dependencies": {
+ "emissary": "^1",
+ "event-kit": "^2.2.0",
+ "fs-plus": "^3.0.0",
+ "grim": "^2.0.1",
+ "oniguruma": "^7.2.3",
+ "season": "^6.0.2",
+ "underscore-plus": "^1"
+ }
+ },
+ "node_modules/fs-plus": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-3.1.1.tgz",
+ "integrity": "sha512-Se2PJdOWXqos1qVTkvqqjb0CSnfBnwwD+pq+z4ksT+e97mEShod/hrNg0TRCCsXPbJzcIq+NuzQhigunMWMJUA==",
+ "dev": true,
+ "dependencies": {
+ "async": "^1.5.2",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.2",
+ "underscore-plus": "1.x"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "node_modules/grim": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/grim/-/grim-2.0.3.tgz",
+ "integrity": "sha512-FM20Ump11qYLK9k9DbL8yzVpy+YBieya1JG15OeH8s+KbHq8kL4SdwRtURwIUHniSxb24EoBUpwKfFjGNVi4/Q==",
+ "dev": true,
+ "dependencies": {
+ "event-kit": "^2.0.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/invert-kv": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==",
+ "dev": true,
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/lcid": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==",
+ "dev": true,
+ "dependencies": {
+ "invert-kv": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ },
+ "node_modules/mixto": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz",
+ "integrity": "sha512-g2Kg8O3ww9RbWuPnAgTsAhe+aBwVXoo/lhYyDKTYPiLKdJofAr97O8zTFzW5UfiJUoeJbmXLmcjDAF7/Egwi8Q==",
+ "dev": true
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/nan": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz",
+ "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==",
+ "dev": true
+ },
+ "node_modules/next-tick": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==",
+ "dev": true
+ },
+ "node_modules/number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/oniguruma": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-7.2.3.tgz",
+ "integrity": "sha512-PZZcE0yfg8Q1IvaJImh21RUTHl8ep0zwwyoE912KqlWVrsGByjjj29sdACcD1BFyX2bLkfuOJeP+POzAGVWtbA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "nan": "^2.14.0"
+ }
+ },
+ "node_modules/os-locale": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==",
+ "dev": true,
+ "dependencies": {
+ "lcid": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/plist": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz",
+ "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==",
+ "dev": true,
+ "dependencies": {
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^9.0.7"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/property-accessors": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz",
+ "integrity": "sha512-WQTVW7rn+k6wq8FyYVM15afyoB2loEdeIzd/o7+HEA5hMZcxvRf4Khie0fBM9wLP3EJotKhiH15kY7Dd4gc57g==",
+ "dev": true,
+ "dependencies": {
+ "es6-weak-map": "^0.1.2",
+ "mixto": "1.x"
+ }
+ },
+ "node_modules/requirefresh": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/requirefresh/-/requirefresh-2.3.0.tgz",
+ "integrity": "sha512-oskKAg0pSlPnJAkFMrcqrHeCGzYunl4Hkl+N/NW3nnFWDHRg97yb475HtF5ax8LP9i8QvVkenVIhjNb+h+P7nA==",
+ "dev": true,
+ "dependencies": {
+ "editions": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/requirefresh/node_modules/editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "dependencies": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ }
+ },
+ "node_modules/safefs": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/safefs/-/safefs-4.2.0.tgz",
+ "integrity": "sha512-1amPBO92jw/hWS+gH/u7z7EL7YxaJ8WecBQl49tMQ6Y6EQfndxNNKwlPqDOcwpUetdmK6nKLoVdjybVScRwq5A==",
+ "dev": true,
+ "dependencies": {
+ "editions": "^2.2.0",
+ "graceful-fs": "^4.2.3"
+ },
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "type": "cooperative",
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/safefs/node_modules/editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "dependencies": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/season": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/season/-/season-6.0.2.tgz",
+ "integrity": "sha512-5eq1ZKvsIUTkefE/R6PhJyiDDaalPjmdhUPVMuOFh4Yz2n5pBl1COkzNlxQyI8BXEBEIu1nJeJqJPVD0c3vycQ==",
+ "dev": true,
+ "dependencies": {
+ "cson-parser": "^1.3.0",
+ "fs-plus": "^3.0.0",
+ "yargs": "^3.23.0"
+ },
+ "bin": {
+ "csonc": "bin/csonc"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "node_modules/string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==",
+ "dev": true,
+ "dependencies": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/syntaxdev": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/syntaxdev/-/syntaxdev-0.1.3.tgz",
+ "integrity": "sha512-Kz+xFeeGm44/MSIMGc4zxWJUYYQ+5Jpq5/fHjNCRoSBv/7o3mP/601lSjr4WgWgIIY8+6b5nr/S/qwy5jt2U5g==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^1.0.2",
+ "chalk": "^2.4.2",
+ "cson": "^5.1.0",
+ "diff": "^4.0.1",
+ "first-mate": "^7.0.4",
+ "js-yaml": "^3.4.2",
+ "plist": "^3.0.1",
+ "temp": "^0.9.0",
+ "underscore": "^1.8.3"
+ },
+ "bin": {
+ "syntaxdev": "bin/syntaxdev.js"
+ }
+ },
+ "node_modules/temp": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz",
+ "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==",
+ "dev": true,
+ "dependencies": {
+ "mkdirp": "^0.5.1",
+ "rimraf": "~2.6.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/temp/node_modules/rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ }
+ },
+ "node_modules/type": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
+ "dev": true
+ },
+ "node_modules/typechecker": {
+ "version": "4.11.0",
+ "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.11.0.tgz",
+ "integrity": "sha512-lz39Mc/d1UBcF/uQFL5P8L+oWdIn/stvkUgHf0tPRW4aEwGGErewNXo2Nb6We2WslWifn00rhcHbbRWRcTGhuw==",
+ "dev": true,
+ "dependencies": {
+ "editions": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/typechecker/node_modules/editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "dependencies": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/underscore": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz",
+ "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==",
+ "dev": true
+ },
+ "node_modules/underscore-plus": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.7.0.tgz",
+ "integrity": "sha512-A3BEzkeicFLnr+U/Q3EyWwJAQPbA19mtZZ4h+lLq3ttm9kn8WC4R3YpuJZEXmWdLjYP47Zc8aLZm9kwdv+zzvA==",
+ "dev": true,
+ "dependencies": {
+ "underscore": "^1.9.1"
+ }
+ },
+ "node_modules/window-size": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
+ "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==",
+ "dev": true,
+ "bin": {
+ "window-size": "cli.js"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/xmlbuilder": {
+ "version": "9.0.7",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
+ "dev": true
+ },
+ "node_modules/yargs": {
+ "version": "3.32.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz",
+ "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==",
+ "dev": true,
+ "dependencies": {
+ "camelcase": "^2.0.1",
+ "cliui": "^3.0.3",
+ "decamelize": "^1.1.1",
+ "os-locale": "^1.4.0",
+ "string-width": "^1.0.1",
+ "window-size": "^0.1.4",
+ "y18n": "^3.2.0"
+ }
+ }
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "async": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "camelcase": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==",
+ "dev": true
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
+ "dev": true
+ },
+ "coffee-script": {
+ "version": "1.12.7",
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
+ "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
+ "dev": true
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "cson": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/cson/-/cson-5.1.0.tgz",
+ "integrity": "sha512-hh97pBcNEc24OQn+CBYu1pp9kcEqp3dE0oO52QIoQkDREnZYHUD1YcKcGvHU+k9lgCmIXHslJfGTie58zjhLnA==",
+ "dev": true,
+ "requires": {
+ "coffee-script": "^1.12.7",
+ "cson-parser": "^1.3.4",
+ "editions": "^1.3.3",
+ "extract-opts": "^3.3.1",
+ "requirefresh": "^2.1.0",
+ "safefs": "^4.1.0"
+ }
+ },
+ "cson-parser": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-1.3.5.tgz",
+ "integrity": "sha512-Pchz4dDkyafUL4V3xBuP9Os8Hu9VU96R+MxuTKh7NR+D866UiWrhBiSLbfuvwApEaJzpXhXTr3iPe4lFtXLzcQ==",
+ "dev": true,
+ "requires": {
+ "coffee-script": "^1.10.0"
+ }
+ },
+ "d": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
+ "integrity": "sha512-0SdM9V9pd/OXJHoWmTfNPTAeD+lw6ZqHg+isPyBFuJsZLSE0Ygg1cYZ/0l6DrKQXMOqGOu1oWupMoOfoRfMZrQ==",
+ "dev": true,
+ "requires": {
+ "es5-ext": "~0.10.2"
+ }
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
+ "dev": true
+ },
+ "diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true
+ },
+ "eachr": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/eachr/-/eachr-3.3.0.tgz",
+ "integrity": "sha512-yKWuGwOE283CTgbEuvqXXusLH4VBXnY2nZbDkeWev+cpAXY6zCIADSPLdvfkAROc0t8S4l07U1fateCdEDuuvg==",
+ "dev": true,
+ "requires": {
+ "editions": "^2.2.0",
+ "typechecker": "^4.9.0"
+ },
+ "dependencies": {
+ "editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "requires": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ }
+ }
+ }
+ },
+ "editions": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
+ "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
+ "dev": true
+ },
+ "emissary": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz",
+ "integrity": "sha512-pD6FWNBSlEOzSJDCTcSGVLgNnGw5fnCvvGMdQ/TN43efeXZ/QTq8+hZoK3OOEXPRNjMmSJmeOnEJh+bWT5O8rQ==",
+ "dev": true,
+ "requires": {
+ "es6-weak-map": "^0.1.2",
+ "mixto": "1.x",
+ "property-accessors": "^1.1",
+ "underscore-plus": "1.x"
+ }
+ },
+ "errlop": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz",
+ "integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==",
+ "dev": true
+ },
+ "es5-ext": {
+ "version": "0.10.61",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
+ "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
+ "dev": true,
+ "requires": {
+ "es6-iterator": "^2.0.3",
+ "es6-symbol": "^3.1.3",
+ "next-tick": "^1.1.0"
+ },
+ "dependencies": {
+ "d": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+ "dev": true,
+ "requires": {
+ "es5-ext": "^0.10.50",
+ "type": "^1.0.1"
+ }
+ },
+ "es6-iterator": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+ "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
+ "dev": true,
+ "requires": {
+ "d": "1",
+ "es5-ext": "^0.10.35",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "es6-symbol": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+ "dev": true,
+ "requires": {
+ "d": "^1.0.1",
+ "ext": "^1.1.2"
+ }
+ }
+ }
+ },
+ "es6-iterator": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz",
+ "integrity": "sha512-6TOmbFM6OPWkTe+bQ3ZuUkvqcWUjAnYjKUCLdbvRsAUz2Pr+fYIibwNXNkLNtIK9PPFbNMZZddaRNkyJhlGJhA==",
+ "dev": true,
+ "requires": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.5",
+ "es6-symbol": "~2.0.1"
+ }
+ },
+ "es6-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
+ "integrity": "sha512-wjobO4zO8726HVU7mI2OA/B6QszqwHJuKab7gKHVx+uRfVVYGcWJkCIFxV2Madqb9/RUSrhJ/r6hPfG7FsWtow==",
+ "dev": true,
+ "requires": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.5"
+ }
+ },
+ "es6-weak-map": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz",
+ "integrity": "sha512-P+N5Cd2TXeb7G59euFiM7snORspgbInS29Nbf3KNO2JQp/DyhvMCDWd58nsVAXwYJ6W3Bx7qDdy6QQ3PCJ7jKQ==",
+ "dev": true,
+ "requires": {
+ "d": "~0.1.1",
+ "es5-ext": "~0.10.6",
+ "es6-iterator": "~0.1.3",
+ "es6-symbol": "~2.0.1"
+ }
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "event-kit": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/event-kit/-/event-kit-2.5.3.tgz",
+ "integrity": "sha512-b7Qi1JNzY4BfAYfnIRanLk0DOD1gdkWHT4GISIn8Q2tAf3LpU8SP2CMwWaq40imYoKWbtN4ZhbSRxvsnikooZQ==",
+ "dev": true
+ },
+ "ext": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz",
+ "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==",
+ "dev": true,
+ "requires": {
+ "type": "^2.5.0"
+ },
+ "dependencies": {
+ "type": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz",
+ "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==",
+ "dev": true
+ }
+ }
+ },
+ "extract-opts": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/extract-opts/-/extract-opts-3.4.0.tgz",
+ "integrity": "sha512-M7Y+1cJDkzOWqvGH5F/V2qgkD6+uitW3NV9rQGl+pLSVuXZ4IDDQgxxMeLPKcWUyfypBWczIILiroSuhXG7Ytg==",
+ "dev": true,
+ "requires": {
+ "eachr": "^3.2.0",
+ "editions": "^2.2.0",
+ "typechecker": "^4.9.0"
+ },
+ "dependencies": {
+ "editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "requires": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ }
+ }
+ }
+ },
+ "first-mate": {
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/first-mate/-/first-mate-7.4.3.tgz",
+ "integrity": "sha512-PtZUpaPmcV5KV4Rw5TfwczEnExN+X1o3Q/G82E4iRJ0tW91fm3Yi7pa5t4cBH8r3D6EyoBKvfpG2jKE+TZ0/nw==",
+ "dev": true,
+ "requires": {
+ "emissary": "^1",
+ "event-kit": "^2.2.0",
+ "fs-plus": "^3.0.0",
+ "grim": "^2.0.1",
+ "oniguruma": "^7.2.3",
+ "season": "^6.0.2",
+ "underscore-plus": "^1"
+ }
+ },
+ "fs-plus": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-3.1.1.tgz",
+ "integrity": "sha512-Se2PJdOWXqos1qVTkvqqjb0CSnfBnwwD+pq+z4ksT+e97mEShod/hrNg0TRCCsXPbJzcIq+NuzQhigunMWMJUA==",
+ "dev": true,
+ "requires": {
+ "async": "^1.5.2",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.2",
+ "underscore-plus": "1.x"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "grim": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/grim/-/grim-2.0.3.tgz",
+ "integrity": "sha512-FM20Ump11qYLK9k9DbL8yzVpy+YBieya1JG15OeH8s+KbHq8kL4SdwRtURwIUHniSxb24EoBUpwKfFjGNVi4/Q==",
+ "dev": true,
+ "requires": {
+ "event-kit": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "invert-kv": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "lcid": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==",
+ "dev": true,
+ "requires": {
+ "invert-kv": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ },
+ "mixto": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz",
+ "integrity": "sha512-g2Kg8O3ww9RbWuPnAgTsAhe+aBwVXoo/lhYyDKTYPiLKdJofAr97O8zTFzW5UfiJUoeJbmXLmcjDAF7/Egwi8Q==",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.6"
+ }
+ },
+ "nan": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz",
+ "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==",
+ "dev": true
+ },
+ "next-tick": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==",
+ "dev": true
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "oniguruma": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/oniguruma/-/oniguruma-7.2.3.tgz",
+ "integrity": "sha512-PZZcE0yfg8Q1IvaJImh21RUTHl8ep0zwwyoE912KqlWVrsGByjjj29sdACcD1BFyX2bLkfuOJeP+POzAGVWtbA==",
+ "dev": true,
+ "requires": {
+ "nan": "^2.14.0"
+ }
+ },
+ "os-locale": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==",
+ "dev": true,
+ "requires": {
+ "lcid": "^1.0.0"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true
+ },
+ "plist": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz",
+ "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==",
+ "dev": true,
+ "requires": {
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^9.0.7"
+ }
+ },
+ "property-accessors": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz",
+ "integrity": "sha512-WQTVW7rn+k6wq8FyYVM15afyoB2loEdeIzd/o7+HEA5hMZcxvRf4Khie0fBM9wLP3EJotKhiH15kY7Dd4gc57g==",
+ "dev": true,
+ "requires": {
+ "es6-weak-map": "^0.1.2",
+ "mixto": "1.x"
+ }
+ },
+ "requirefresh": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/requirefresh/-/requirefresh-2.3.0.tgz",
+ "integrity": "sha512-oskKAg0pSlPnJAkFMrcqrHeCGzYunl4Hkl+N/NW3nnFWDHRg97yb475HtF5ax8LP9i8QvVkenVIhjNb+h+P7nA==",
+ "dev": true,
+ "requires": {
+ "editions": "^2.2.0"
+ },
+ "dependencies": {
+ "editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "requires": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ }
+ }
+ }
+ },
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "safefs": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/safefs/-/safefs-4.2.0.tgz",
+ "integrity": "sha512-1amPBO92jw/hWS+gH/u7z7EL7YxaJ8WecBQl49tMQ6Y6EQfndxNNKwlPqDOcwpUetdmK6nKLoVdjybVScRwq5A==",
+ "dev": true,
+ "requires": {
+ "editions": "^2.2.0",
+ "graceful-fs": "^4.2.3"
+ },
+ "dependencies": {
+ "editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "requires": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ }
+ }
+ }
+ },
+ "season": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/season/-/season-6.0.2.tgz",
+ "integrity": "sha512-5eq1ZKvsIUTkefE/R6PhJyiDDaalPjmdhUPVMuOFh4Yz2n5pBl1COkzNlxQyI8BXEBEIu1nJeJqJPVD0c3vycQ==",
+ "dev": true,
+ "requires": {
+ "cson-parser": "^1.3.0",
+ "fs-plus": "^3.0.0",
+ "yargs": "^3.23.0"
+ }
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
+ "syntaxdev": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/syntaxdev/-/syntaxdev-0.1.3.tgz",
+ "integrity": "sha512-Kz+xFeeGm44/MSIMGc4zxWJUYYQ+5Jpq5/fHjNCRoSBv/7o3mP/601lSjr4WgWgIIY8+6b5nr/S/qwy5jt2U5g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.2",
+ "chalk": "^2.4.2",
+ "cson": "^5.1.0",
+ "diff": "^4.0.1",
+ "first-mate": "^7.0.4",
+ "js-yaml": "^3.4.2",
+ "plist": "^3.0.1",
+ "temp": "^0.9.0",
+ "underscore": "^1.8.3"
+ }
+ },
+ "temp": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz",
+ "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==",
+ "dev": true,
+ "requires": {
+ "mkdirp": "^0.5.1",
+ "rimraf": "~2.6.2"
+ },
+ "dependencies": {
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ }
+ }
+ },
+ "type": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
+ "dev": true
+ },
+ "typechecker": {
+ "version": "4.11.0",
+ "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.11.0.tgz",
+ "integrity": "sha512-lz39Mc/d1UBcF/uQFL5P8L+oWdIn/stvkUgHf0tPRW4aEwGGErewNXo2Nb6We2WslWifn00rhcHbbRWRcTGhuw==",
+ "dev": true,
+ "requires": {
+ "editions": "^2.2.0"
+ },
+ "dependencies": {
+ "editions": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz",
+ "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==",
+ "dev": true,
+ "requires": {
+ "errlop": "^2.0.0",
+ "semver": "^6.3.0"
+ }
+ }
+ }
+ },
+ "underscore": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz",
+ "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==",
+ "dev": true
+ },
+ "underscore-plus": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.7.0.tgz",
+ "integrity": "sha512-A3BEzkeicFLnr+U/Q3EyWwJAQPbA19mtZZ4h+lLq3ttm9kn8WC4R3YpuJZEXmWdLjYP47Zc8aLZm9kwdv+zzvA==",
+ "dev": true,
+ "requires": {
+ "underscore": "^1.9.1"
+ }
+ },
+ "window-size": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
+ "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "xmlbuilder": {
+ "version": "9.0.7",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==",
+ "dev": true
+ },
+ "y18n": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "3.32.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz",
+ "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^2.0.1",
+ "cliui": "^3.0.3",
+ "decamelize": "^1.1.1",
+ "os-locale": "^1.4.0",
+ "string-width": "^1.0.1",
+ "window-size": "^0.1.4",
+ "y18n": "^3.2.0"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index a974bd74..a1c861a2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
- "name": "MagicPython",
- "version": "1.1.1",
+ "name": "magicpython",
+ "version": "1.2.0",
"engines": {
"atom": "*",
"node": "*",
@@ -15,9 +15,9 @@
},
"description": "Syntax highlighter for cutting edge Python.",
"license": "MIT",
- "publisher": "magicstack",
+ "publisher": "QuentiumYT",
"categories": [
- "Languages"
+ "Programming Languages"
],
"keywords": [
"python",
@@ -72,8 +72,7 @@
]
},
"devDependencies": {
- "oniguruma": "^7.0.0",
+ "oniguruma": "^7.2.3",
"syntaxdev": "^0.1.3"
- },
- "dependencies": {}
+ }
}
diff --git a/test/atom-spec/python-spec.js b/test/atom-spec/python-spec.js
index 032c3682..6ed7ce2e 100644
--- a/test/atom-spec/python-spec.js
+++ b/test/atom-spec/python-spec.js
@@ -5800,6 +5800,77 @@ describe("Grammar Tests", function() {
expect(tokens[5][4].scopes).toEqual(["source.python"]);
});
+ it("test/expressions/expr21.py",
+ function() {
+ tokens = grammar.tokenizeLines("while chunk := file.read(8192):\n process(chunk)\n y0 = (y1 := f(x))")
+ expect(tokens[0][0].value).toBe("while");
+ expect(tokens[0][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("chunk");
+ expect(tokens[0][2].scopes).toEqual(["source.python"]);
+ expect(tokens[0][3].value).toBe(" ");
+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
+ expect(tokens[0][4].value).toBe(":=");
+ expect(tokens[0][4].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[0][5].value).toBe(" ");
+ expect(tokens[0][5].scopes).toEqual(["source.python"]);
+ expect(tokens[0][6].value).toBe("file");
+ expect(tokens[0][6].scopes).toEqual(["source.python","variable.legacy.builtin.python"]);
+ expect(tokens[0][7].value).toBe(".");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.member.access.python","punctuation.separator.period.python"]);
+ expect(tokens[0][8].value).toBe("read");
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.member.access.python","meta.function-call.python","meta.function-call.generic.python"]);
+ expect(tokens[0][9].value).toBe("(");
+ expect(tokens[0][9].scopes).toEqual(["source.python","meta.member.access.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
+ expect(tokens[0][10].value).toBe("8192");
+ expect(tokens[0][10].scopes).toEqual(["source.python","meta.member.access.python","meta.function-call.python","meta.function-call.arguments.python","constant.numeric.dec.python"]);
+ expect(tokens[0][11].value).toBe(")");
+ expect(tokens[0][11].scopes).toEqual(["source.python","meta.member.access.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
+ expect(tokens[0][12].value).toBe(":");
+ expect(tokens[0][12].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[1][0].value).toBe(" ");
+ expect(tokens[1][0].scopes).toEqual(["source.python"]);
+ expect(tokens[1][1].value).toBe("process");
+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.generic.python"]);
+ expect(tokens[1][2].value).toBe("(");
+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
+ expect(tokens[1][3].value).toBe("chunk");
+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
+ expect(tokens[1][4].value).toBe(")");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
+ expect(tokens[2][0].value).toBe(" ");
+ expect(tokens[2][0].scopes).toEqual(["source.python"]);
+ expect(tokens[2][1].value).toBe("y0");
+ expect(tokens[2][1].scopes).toEqual(["source.python"]);
+ expect(tokens[2][2].value).toBe(" ");
+ expect(tokens[2][2].scopes).toEqual(["source.python"]);
+ expect(tokens[2][3].value).toBe("=");
+ expect(tokens[2][3].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[2][4].value).toBe(" ");
+ expect(tokens[2][4].scopes).toEqual(["source.python"]);
+ expect(tokens[2][5].value).toBe("(");
+ expect(tokens[2][5].scopes).toEqual(["source.python","punctuation.parenthesis.begin.python"]);
+ expect(tokens[2][6].value).toBe("y1");
+ expect(tokens[2][6].scopes).toEqual(["source.python"]);
+ expect(tokens[2][7].value).toBe(" ");
+ expect(tokens[2][7].scopes).toEqual(["source.python"]);
+ expect(tokens[2][8].value).toBe(":=");
+ expect(tokens[2][8].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[2][9].value).toBe(" ");
+ expect(tokens[2][9].scopes).toEqual(["source.python"]);
+ expect(tokens[2][10].value).toBe("f");
+ expect(tokens[2][10].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.generic.python"]);
+ expect(tokens[2][11].value).toBe("(");
+ expect(tokens[2][11].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
+ expect(tokens[2][12].value).toBe("x");
+ expect(tokens[2][12].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
+ expect(tokens[2][13].value).toBe(")");
+ expect(tokens[2][13].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
+ expect(tokens[2][14].value).toBe(")");
+ expect(tokens[2][14].scopes).toEqual(["source.python","punctuation.parenthesis.end.python"]);
+ });
+
it("test/expressions/expr3.py",
function() {
tokens = grammar.tokenizeLines("(a, *rest, b) = range(5)")
@@ -6539,39 +6610,313 @@ describe("Grammar Tests", function() {
function() {
tokens = grammar.tokenizeLines("rf\"{} { }\"\nrf\"\"\"{}\n{ }\n\"\"\"")
expect(tokens[0][0].value).toBe("rf");
- expect(tokens[0][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[0][1].value).toBe("\"");
- expect(tokens[0][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
expect(tokens[0][2].value).toBe("{");
- expect(tokens[0][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[0][3].value).toBe("}");
- expect(tokens[0][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[0][4].value).toBe(" ");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[0][5].value).toBe("{");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[0][6].value).toBe(" ");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","invalid.illegal.brace.python"]);
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","invalid.illegal.brace.python"]);
expect(tokens[0][7].value).toBe("}");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[0][8].value).toBe("\"");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[1][0].value).toBe("rf");
- expect(tokens[1][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[1][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.multi.python string.interpolated.python"]);
expect(tokens[1][1].value).toBe("\"\"\"");
- expect(tokens[1][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python punctuation.definition.string.begin.python"]);
expect(tokens[1][2].value).toBe("{");
- expect(tokens[1][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[1][3].value).toBe("}");
- expect(tokens[1][3].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][4].value).toBe("");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
expect(tokens[2][0].value).toBe("{");
- expect(tokens[2][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][0].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
expect(tokens[2][1].value).toBe(" ");
- expect(tokens[2][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","invalid.illegal.brace.python"]);
+ expect(tokens[2][1].scopes).toEqual(["source.python","meta.fstring.python","invalid.illegal.brace.python"]);
expect(tokens[2][2].value).toBe("}");
- expect(tokens[2][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][2].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][3].value).toBe("");
+ expect(tokens[2][3].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
expect(tokens[3][0].value).toBe("\"\"\"");
- expect(tokens[3][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[3][0].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python punctuation.definition.string.end.python"]);
+ });
+
+ it("test/fstrings/fraw1.py",
+ function() {
+ tokens = grammar.tokenizeLines("a = fr'[a-z]'\na = Fr'[a-z]'\na = rf'[a-z]'\na = rF'[a-z]'")
+ expect(tokens[0][0].value).toBe("a");
+ expect(tokens[0][0].scopes).toEqual(["source.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("=");
+ expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[0][3].value).toBe(" ");
+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
+ expect(tokens[0][4].value).toBe("fr");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][5].value).toBe("'");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[0][6].value).toBe("[a-z]");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][7].value).toBe("'");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[1][0].value).toBe("a");
+ expect(tokens[1][0].scopes).toEqual(["source.python"]);
+ expect(tokens[1][1].value).toBe(" ");
+ expect(tokens[1][1].scopes).toEqual(["source.python"]);
+ expect(tokens[1][2].value).toBe("=");
+ expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[1][3].value).toBe(" ");
+ expect(tokens[1][3].scopes).toEqual(["source.python"]);
+ expect(tokens[1][4].value).toBe("Fr");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][5].value).toBe("'");
+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[1][6].value).toBe("[a-z]");
+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][7].value).toBe("'");
+ expect(tokens[1][7].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[2][0].value).toBe("a");
+ expect(tokens[2][0].scopes).toEqual(["source.python"]);
+ expect(tokens[2][1].value).toBe(" ");
+ expect(tokens[2][1].scopes).toEqual(["source.python"]);
+ expect(tokens[2][2].value).toBe("=");
+ expect(tokens[2][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[2][3].value).toBe(" ");
+ expect(tokens[2][3].scopes).toEqual(["source.python"]);
+ expect(tokens[2][4].value).toBe("rf");
+ expect(tokens[2][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][5].value).toBe("'");
+ expect(tokens[2][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[2][6].value).toBe("[a-z]");
+ expect(tokens[2][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][7].value).toBe("'");
+ expect(tokens[2][7].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[3][0].value).toBe("a");
+ expect(tokens[3][0].scopes).toEqual(["source.python"]);
+ expect(tokens[3][1].value).toBe(" ");
+ expect(tokens[3][1].scopes).toEqual(["source.python"]);
+ expect(tokens[3][2].value).toBe("=");
+ expect(tokens[3][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[3][3].value).toBe(" ");
+ expect(tokens[3][3].scopes).toEqual(["source.python"]);
+ expect(tokens[3][4].value).toBe("rF");
+ expect(tokens[3][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[3][5].value).toBe("'");
+ expect(tokens[3][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[3][6].value).toBe("[a-z]");
+ expect(tokens[3][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[3][7].value).toBe("'");
+ expect(tokens[3][7].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ });
+
+ it("test/fstrings/fraw2.py",
+ function() {
+ tokens = grammar.tokenizeLines("rf'fo{{2}}'\nrf\"fo{{2}}\"\nrf'''fo{{2}}'''\nrf\"\"\"fo{{2}}\"\"\"")
+ expect(tokens[0][0].value).toBe("rf");
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][1].value).toBe("'");
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[0][2].value).toBe("fo");
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][3].value).toBe("{{");
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[0][4].value).toBe("2");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][5].value).toBe("}}");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[0][6].value).toBe("'");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[1][0].value).toBe("rf");
+ expect(tokens[1][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][1].value).toBe("\"");
+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[1][2].value).toBe("fo");
+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][3].value).toBe("{{");
+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[1][4].value).toBe("2");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][5].value).toBe("}}");
+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[1][6].value).toBe("\"");
+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[2][0].value).toBe("rf");
+ expect(tokens[2][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[2][1].value).toBe("'''");
+ expect(tokens[2][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python punctuation.definition.string.begin.python"]);
+ expect(tokens[2][2].value).toBe("fo");
+ expect(tokens[2][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[2][3].value).toBe("{{");
+ expect(tokens[2][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[2][4].value).toBe("2");
+ expect(tokens[2][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[2][5].value).toBe("}}");
+ expect(tokens[2][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[2][6].value).toBe("'''");
+ expect(tokens[2][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[3][0].value).toBe("rf");
+ expect(tokens[3][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[3][1].value).toBe("\"\"\"");
+ expect(tokens[3][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python punctuation.definition.string.begin.python"]);
+ expect(tokens[3][2].value).toBe("fo");
+ expect(tokens[3][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[3][3].value).toBe("{{");
+ expect(tokens[3][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[3][4].value).toBe("2");
+ expect(tokens[3][4].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[3][5].value).toBe("}}");
+ expect(tokens[3][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[3][6].value).toBe("\"\"\"");
+ expect(tokens[3][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python punctuation.definition.string.end.python"]);
+ });
+
+ it("test/fstrings/fraw3.py",
+ function() {
+ tokens = grammar.tokenizeLines("rf'fo{2}'\nrf\"fo{2}\"\nrf'''fo{2}'''\nrf\"\"\"fo{2}\"\"\"")
+ expect(tokens[0][0].value).toBe("rf");
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][1].value).toBe("'");
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[0][2].value).toBe("fo");
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][3].value).toBe("{");
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][4].value).toBe("2");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python","constant.numeric.dec.python"]);
+ expect(tokens[0][5].value).toBe("}");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][6].value).toBe("'");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[1][0].value).toBe("rf");
+ expect(tokens[1][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][1].value).toBe("\"");
+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[1][2].value).toBe("fo");
+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][3].value).toBe("{");
+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][4].value).toBe("2");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python","constant.numeric.dec.python"]);
+ expect(tokens[1][5].value).toBe("}");
+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][6].value).toBe("\"");
+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[2][0].value).toBe("rf");
+ expect(tokens[2][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[2][1].value).toBe("'''");
+ expect(tokens[2][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python punctuation.definition.string.begin.python"]);
+ expect(tokens[2][2].value).toBe("fo");
+ expect(tokens[2][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[2][3].value).toBe("{");
+ expect(tokens[2][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][4].value).toBe("2");
+ expect(tokens[2][4].scopes).toEqual(["source.python","meta.fstring.python","constant.numeric.dec.python"]);
+ expect(tokens[2][5].value).toBe("}");
+ expect(tokens[2][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][6].value).toBe("'''");
+ expect(tokens[2][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[3][0].value).toBe("rf");
+ expect(tokens[3][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[3][1].value).toBe("\"\"\"");
+ expect(tokens[3][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python punctuation.definition.string.begin.python"]);
+ expect(tokens[3][2].value).toBe("fo");
+ expect(tokens[3][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python"]);
+ expect(tokens[3][3].value).toBe("{");
+ expect(tokens[3][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[3][4].value).toBe("2");
+ expect(tokens[3][4].scopes).toEqual(["source.python","meta.fstring.python","constant.numeric.dec.python"]);
+ expect(tokens[3][5].value).toBe("}");
+ expect(tokens[3][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[3][6].value).toBe("\"\"\"");
+ expect(tokens[3][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.multi.python string.interpolated.python punctuation.definition.string.end.python"]);
+ });
+
+ it("test/fstrings/fraw4.py",
+ function() {
+ tokens = grammar.tokenizeLines("a = rf'fo{{{2}}}'\na = rf'fo{{{bar}}}'\na = rf'fo{{2}}'")
+ expect(tokens[0][0].value).toBe("a");
+ expect(tokens[0][0].scopes).toEqual(["source.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("=");
+ expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[0][3].value).toBe(" ");
+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
+ expect(tokens[0][4].value).toBe("rf");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][5].value).toBe("'");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[0][6].value).toBe("fo");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][7].value).toBe("{{");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[0][8].value).toBe("{");
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][9].value).toBe("2");
+ expect(tokens[0][9].scopes).toEqual(["source.python","meta.fstring.python","constant.numeric.dec.python"]);
+ expect(tokens[0][10].value).toBe("}");
+ expect(tokens[0][10].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][11].value).toBe("}}");
+ expect(tokens[0][11].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[0][12].value).toBe("'");
+ expect(tokens[0][12].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[1][0].value).toBe("a");
+ expect(tokens[1][0].scopes).toEqual(["source.python"]);
+ expect(tokens[1][1].value).toBe(" ");
+ expect(tokens[1][1].scopes).toEqual(["source.python"]);
+ expect(tokens[1][2].value).toBe("=");
+ expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[1][3].value).toBe(" ");
+ expect(tokens[1][3].scopes).toEqual(["source.python"]);
+ expect(tokens[1][4].value).toBe("rf");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][5].value).toBe("'");
+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[1][6].value).toBe("fo");
+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][7].value).toBe("{{");
+ expect(tokens[1][7].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[1][8].value).toBe("{");
+ expect(tokens[1][8].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][9].value).toBe("bar");
+ expect(tokens[1][9].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[1][10].value).toBe("}");
+ expect(tokens[1][10].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][11].value).toBe("}}");
+ expect(tokens[1][11].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[1][12].value).toBe("'");
+ expect(tokens[1][12].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ expect(tokens[2][0].value).toBe("a");
+ expect(tokens[2][0].scopes).toEqual(["source.python"]);
+ expect(tokens[2][1].value).toBe(" ");
+ expect(tokens[2][1].scopes).toEqual(["source.python"]);
+ expect(tokens[2][2].value).toBe("=");
+ expect(tokens[2][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[2][3].value).toBe(" ");
+ expect(tokens[2][3].scopes).toEqual(["source.python"]);
+ expect(tokens[2][4].value).toBe("rf");
+ expect(tokens[2][4].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][5].value).toBe("'");
+ expect(tokens[2][5].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
+ expect(tokens[2][6].value).toBe("fo");
+ expect(tokens[2][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][7].value).toBe("{{");
+ expect(tokens[2][7].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[2][8].value).toBe("2");
+ expect(tokens[2][8].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][9].value).toBe("}}");
+ expect(tokens[2][9].scopes).toEqual(["source.python","meta.fstring.python","constant.character.escape.python"]);
+ expect(tokens[2][10].value).toBe("'");
+ expect(tokens[2][10].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
});
it("test/fstrings/nested1.py",
@@ -7013,25 +7358,33 @@ describe("Grammar Tests", function() {
expect(tokens[1][6].value).toBe("'");
expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[2][0].value).toBe("rf");
- expect(tokens[2][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[2][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[2][1].value).toBe("'");
- expect(tokens[2][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[2][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
expect(tokens[2][2].value).toBe("some ");
- expect(tokens[2][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[2][3].value).toBe("{obj}");
- expect(tokens[2][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[2][4].value).toBe("'");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[2][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[2][3].value).toBe("{");
+ expect(tokens[2][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][4].value).toBe("obj");
+ expect(tokens[2][4].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[2][5].value).toBe("}");
+ expect(tokens[2][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[2][6].value).toBe("'");
+ expect(tokens[2][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[3][0].value).toBe("rF");
- expect(tokens[3][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[3][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[3][1].value).toBe("'");
- expect(tokens[3][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[3][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
expect(tokens[3][2].value).toBe("some ");
- expect(tokens[3][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[3][3].value).toBe("{obj}");
- expect(tokens[3][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[3][4].value).toBe("'");
- expect(tokens[3][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[3][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[3][3].value).toBe("{");
+ expect(tokens[3][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[3][4].value).toBe("obj");
+ expect(tokens[3][4].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[3][5].value).toBe("}");
+ expect(tokens[3][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[3][6].value).toBe("'");
+ expect(tokens[3][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[4][0].value).toBe("Rf");
expect(tokens[4][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[4][1].value).toBe("'");
@@ -7066,25 +7419,33 @@ describe("Grammar Tests", function() {
function() {
tokens = grammar.tokenizeLines("fr'some {obj}'\nFr'some {obj}'\nfR'some {obj}'\nFR'some {obj}'")
expect(tokens[0][0].value).toBe("fr");
- expect(tokens[0][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[0][1].value).toBe("'");
- expect(tokens[0][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
expect(tokens[0][2].value).toBe("some ");
- expect(tokens[0][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][3].value).toBe("{obj}");
- expect(tokens[0][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][4].value).toBe("'");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[0][3].value).toBe("{");
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][4].value).toBe("obj");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[0][5].value).toBe("}");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][6].value).toBe("'");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[1][0].value).toBe("Fr");
- expect(tokens[1][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
+ expect(tokens[1][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[1][1].value).toBe("'");
- expect(tokens[1][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python punctuation.definition.string.begin.python"]);
expect(tokens[1][2].value).toBe("some ");
- expect(tokens[1][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][3].value).toBe("{obj}");
- expect(tokens[1][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][4].value).toBe("'");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python"]);
+ expect(tokens[1][3].value).toBe("{");
+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][4].value).toBe("obj");
+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[1][5].value).toBe("}");
+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[1][6].value).toBe("'");
+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.raw.single.python string.interpolated.python punctuation.definition.string.end.python"]);
expect(tokens[2][0].value).toBe("fR");
expect(tokens[2][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.raw.single.python string.interpolated.python"]);
expect(tokens[2][1].value).toBe("'");
@@ -7490,10 +7851,41 @@ describe("Grammar Tests", function() {
expect(tokens[2][20].scopes).toEqual(["source.python","comment.line.number-sign.python"]);
});
- it("test/fstrings/simple2.py",
+ it("test/fstrings/simple10.py",
function() {
- tokens = grammar.tokenizeLines("a = f\"normal {{ normal }} normal } {10!r} normal {fo.__add__!s}\"")
- expect(tokens[0][0].value).toBe("a");
+ tokens = grammar.tokenizeLines("f'values: {a=} {b=!r}'")
+ expect(tokens[0][0].value).toBe("f");
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.fstring.python","storage.type.string.python string.quoted.single.python string.interpolated.python"]);
+ expect(tokens[0][1].value).toBe("'");
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.single.python string.interpolated.python punctuation.definition.string.begin.python"]);
+ expect(tokens[0][2].value).toBe("values: ");
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.single.python string.interpolated.python"]);
+ expect(tokens[0][3].value).toBe("{");
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][4].value).toBe("a");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[0][5].value).toBe("=");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.fstring.python","storage.type.format.python"]);
+ expect(tokens[0][6].value).toBe("}");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][7].value).toBe(" ");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.single.python string.interpolated.python"]);
+ expect(tokens[0][8].value).toBe("{");
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][9].value).toBe("b");
+ expect(tokens[0][9].scopes).toEqual(["source.python","meta.fstring.python"]);
+ expect(tokens[0][10].value).toBe("=!r");
+ expect(tokens[0][10].scopes).toEqual(["source.python","meta.fstring.python","storage.type.format.python"]);
+ expect(tokens[0][11].value).toBe("}");
+ expect(tokens[0][11].scopes).toEqual(["source.python","meta.fstring.python","constant.character.format.placeholder.other.python"]);
+ expect(tokens[0][12].value).toBe("'");
+ expect(tokens[0][12].scopes).toEqual(["source.python","meta.fstring.python","string.quoted.single.python string.interpolated.python punctuation.definition.string.end.python"]);
+ });
+
+ it("test/fstrings/simple2.py",
+ function() {
+ tokens = grammar.tokenizeLines("a = f\"normal {{ normal }} normal } {10!r} normal {fo.__add__!s}\"")
+ expect(tokens[0][0].value).toBe("a");
expect(tokens[0][0].scopes).toEqual(["source.python"]);
expect(tokens[0][1].value).toBe(" ");
expect(tokens[0][1].scopes).toEqual(["source.python"]);
@@ -8501,6 +8893,67 @@ describe("Grammar Tests", function() {
expect(tokens[14][9].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
});
+ it("test/functions/decl15.py",
+ function() {
+ tokens = grammar.tokenizeLines("def showcase(a, b, /, c, d, *, e, f):\n return")
+ expect(tokens[0][0].value).toBe("def");
+ expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.python","storage.type.function.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.python"]);
+ expect(tokens[0][2].value).toBe("showcase");
+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.python","entity.name.function.python"]);
+ expect(tokens[0][3].value).toBe("(");
+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.definition.parameters.begin.python"]);
+ expect(tokens[0][4].value).toBe("a");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][5].value).toBe(",");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][6].value).toBe(" ");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][7].value).toBe("b");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][8].value).toBe(",");
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][9].value).toBe(" ");
+ expect(tokens[0][9].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][10].value).toBe("/");
+ expect(tokens[0][10].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","keyword.operator.positional.parameter.python"]);
+ expect(tokens[0][11].value).toBe(", ");
+ expect(tokens[0][11].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][12].value).toBe("c");
+ expect(tokens[0][12].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][13].value).toBe(",");
+ expect(tokens[0][13].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][14].value).toBe(" ");
+ expect(tokens[0][14].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][15].value).toBe("d");
+ expect(tokens[0][15].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][16].value).toBe(",");
+ expect(tokens[0][16].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][17].value).toBe(" ");
+ expect(tokens[0][17].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][18].value).toBe("*");
+ expect(tokens[0][18].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","keyword.operator.unpacking.parameter.python"]);
+ expect(tokens[0][19].value).toBe(", ");
+ expect(tokens[0][19].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][20].value).toBe("e");
+ expect(tokens[0][20].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][21].value).toBe(",");
+ expect(tokens[0][21].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][22].value).toBe(" ");
+ expect(tokens[0][22].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python"]);
+ expect(tokens[0][23].value).toBe("f");
+ expect(tokens[0][23].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][24].value).toBe(")");
+ expect(tokens[0][24].scopes).toEqual(["source.python","meta.function.python","meta.function.parameters.python","punctuation.definition.parameters.end.python"]);
+ expect(tokens[0][25].value).toBe(":");
+ expect(tokens[0][25].scopes).toEqual(["source.python","meta.function.python","punctuation.section.function.begin.python"]);
+ expect(tokens[1][0].value).toBe(" ");
+ expect(tokens[1][0].scopes).toEqual(["source.python"]);
+ expect(tokens[1][1].value).toBe("return");
+ expect(tokens[1][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ });
+
it("test/functions/decl2.py",
function() {
tokens = grammar.tokenizeLines("def result_annot(lambda, lambda=) -> qqq[None]:\n pass")
@@ -9632,6 +10085,71 @@ describe("Grammar Tests", function() {
expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
});
+ it("test/functions/lambda10.py",
+ function() {
+ tokens = grammar.tokenizeLines("showcase = lambda a, /, b, *, c: (a + b + c)")
+ expect(tokens[0][0].value).toBe("showcase");
+ expect(tokens[0][0].scopes).toEqual(["source.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("=");
+ expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[0][3].value).toBe(" ");
+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
+ expect(tokens[0][4].value).toBe("lambda");
+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.lambda-function.python","storage.type.function.lambda.python"]);
+ expect(tokens[0][5].value).toBe(" ");
+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python"]);
+ expect(tokens[0][6].value).toBe("a");
+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][7].value).toBe(",");
+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][8].value).toBe(" ");
+ expect(tokens[0][8].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python"]);
+ expect(tokens[0][9].value).toBe("/");
+ expect(tokens[0][9].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","keyword.operator.positional.parameter.python"]);
+ expect(tokens[0][10].value).toBe(", ");
+ expect(tokens[0][10].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python"]);
+ expect(tokens[0][11].value).toBe("b");
+ expect(tokens[0][11].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][12].value).toBe(",");
+ expect(tokens[0][12].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","punctuation.separator.parameters.python"]);
+ expect(tokens[0][13].value).toBe(" ");
+ expect(tokens[0][13].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python"]);
+ expect(tokens[0][14].value).toBe("*");
+ expect(tokens[0][14].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","keyword.operator.unpacking.parameter.python"]);
+ expect(tokens[0][15].value).toBe(", ");
+ expect(tokens[0][15].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python"]);
+ expect(tokens[0][16].value).toBe("c");
+ expect(tokens[0][16].scopes).toEqual(["source.python","meta.lambda-function.python","meta.function.lambda.parameters.python","variable.parameter.function.language.python"]);
+ expect(tokens[0][17].value).toBe(":");
+ expect(tokens[0][17].scopes).toEqual(["source.python","meta.lambda-function.python","punctuation.section.function.lambda.begin.python"]);
+ expect(tokens[0][18].value).toBe(" ");
+ expect(tokens[0][18].scopes).toEqual(["source.python"]);
+ expect(tokens[0][19].value).toBe("(");
+ expect(tokens[0][19].scopes).toEqual(["source.python","punctuation.parenthesis.begin.python"]);
+ expect(tokens[0][20].value).toBe("a");
+ expect(tokens[0][20].scopes).toEqual(["source.python"]);
+ expect(tokens[0][21].value).toBe(" ");
+ expect(tokens[0][21].scopes).toEqual(["source.python"]);
+ expect(tokens[0][22].value).toBe("+");
+ expect(tokens[0][22].scopes).toEqual(["source.python","keyword.operator.arithmetic.python"]);
+ expect(tokens[0][23].value).toBe(" ");
+ expect(tokens[0][23].scopes).toEqual(["source.python"]);
+ expect(tokens[0][24].value).toBe("b");
+ expect(tokens[0][24].scopes).toEqual(["source.python"]);
+ expect(tokens[0][25].value).toBe(" ");
+ expect(tokens[0][25].scopes).toEqual(["source.python"]);
+ expect(tokens[0][26].value).toBe("+");
+ expect(tokens[0][26].scopes).toEqual(["source.python","keyword.operator.arithmetic.python"]);
+ expect(tokens[0][27].value).toBe(" ");
+ expect(tokens[0][27].scopes).toEqual(["source.python"]);
+ expect(tokens[0][28].value).toBe("c");
+ expect(tokens[0][28].scopes).toEqual(["source.python"]);
+ expect(tokens[0][29].value).toBe(")");
+ expect(tokens[0][29].scopes).toEqual(["source.python","punctuation.parenthesis.end.python"]);
+ });
+
it("test/functions/lambda2.py",
function() {
tokens = grammar.tokenizeLines("lll(lambda=1)")
@@ -10367,435 +10885,101 @@ describe("Grammar Tests", function() {
it("test/numbers/invalid.py",
function() {
tokens = grammar.tokenizeLines("0123\n0123l\n123f\n123d\n123A\n123__456\n123_")
- expect(tokens[0][0].value).toBe("0");
- expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
- expect(tokens[0][1].value).toBe("123");
- expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.dec.python","invalid.illegal.dec.python"]);
- expect(tokens[1][0].value).toBe("0123l");
- expect(tokens[1][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[2][0].value).toBe("123f");
- expect(tokens[2][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[3][0].value).toBe("123d");
- expect(tokens[3][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[4][0].value).toBe("123A");
- expect(tokens[4][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[5][0].value).toBe("123__456");
- expect(tokens[5][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[6][0].value).toBe("123_");
- expect(tokens[6][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- });
-
- it("test/numbers/nondec.py",
- function() {
- tokens = grammar.tokenizeLines("0o1234567\n0O1234567\n0o1_234_567\n0b0000\n0B0001\n0b_0011_1001\n0xabcdef01234567890\n0XFF12\n0xab_cd_ef_01_23_45_67_89_00\n\n0o\n0b\n0x\n0z\n\n0b02\n0x0z\n0o90")
- expect(tokens[0][0].value).toBe("0o");
- expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
- expect(tokens[0][1].value).toBe("1234567");
- expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
- expect(tokens[1][0].value).toBe("0O");
- expect(tokens[1][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
- expect(tokens[1][1].value).toBe("1234567");
- expect(tokens[1][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
- expect(tokens[2][0].value).toBe("0o");
- expect(tokens[2][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
- expect(tokens[2][1].value).toBe("1_234_567");
- expect(tokens[2][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
- expect(tokens[3][0].value).toBe("0b");
- expect(tokens[3][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
- expect(tokens[3][1].value).toBe("0000");
- expect(tokens[3][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
- expect(tokens[4][0].value).toBe("0B");
- expect(tokens[4][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
- expect(tokens[4][1].value).toBe("0001");
- expect(tokens[4][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
- expect(tokens[5][0].value).toBe("0b");
- expect(tokens[5][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
- expect(tokens[5][1].value).toBe("_0011_1001");
- expect(tokens[5][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
- expect(tokens[6][0].value).toBe("0x");
- expect(tokens[6][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
- expect(tokens[6][1].value).toBe("abcdef01234567890");
- expect(tokens[6][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
- expect(tokens[7][0].value).toBe("0X");
- expect(tokens[7][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
- expect(tokens[7][1].value).toBe("FF12");
- expect(tokens[7][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
- expect(tokens[8][0].value).toBe("0x");
- expect(tokens[8][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
- expect(tokens[8][1].value).toBe("ab_cd_ef_01_23_45_67_89_00");
- expect(tokens[8][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
- expect(tokens[9][0].value).toBe("");
- expect(tokens[9][0].scopes).toEqual(["source.python"]);
- expect(tokens[10][0].value).toBe("0o");
- expect(tokens[10][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[11][0].value).toBe("0b");
- expect(tokens[11][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[12][0].value).toBe("0x");
- expect(tokens[12][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[13][0].value).toBe("0z");
- expect(tokens[13][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[14][0].value).toBe("");
- expect(tokens[14][0].scopes).toEqual(["source.python"]);
- expect(tokens[15][0].value).toBe("0b02");
- expect(tokens[15][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[16][0].value).toBe("0x0z");
- expect(tokens[16][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- expect(tokens[17][0].value).toBe("0o90");
- expect(tokens[17][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- });
-
- it("test/numbers/python2.py",
- function() {
- tokens = grammar.tokenizeLines("123l\n123L\n1_234l")
- expect(tokens[0][0].value).toBe("123");
- expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
- expect(tokens[0][1].value).toBe("l");
- expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
- expect(tokens[1][0].value).toBe("123");
- expect(tokens[1][0].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
- expect(tokens[1][1].value).toBe("L");
- expect(tokens[1][1].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
- expect(tokens[2][0].value).toBe("1_234l");
- expect(tokens[2][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
- });
-
- it("test/regexp/comments1.py",
- function() {
- tokens = grammar.tokenizeLines("a = r'''foo[abc] # comment'''")
- expect(tokens[0][0].value).toBe("a");
- expect(tokens[0][0].scopes).toEqual(["source.python"]);
- expect(tokens[0][1].value).toBe(" ");
- expect(tokens[0][1].scopes).toEqual(["source.python"]);
- expect(tokens[0][2].value).toBe("=");
- expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[0][3].value).toBe(" ");
- expect(tokens[0][3].scopes).toEqual(["source.python"]);
- expect(tokens[0][4].value).toBe("r");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","storage.type.string.python"]);
- expect(tokens[0][5].value).toBe("'''");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][6].value).toBe("foo");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.multi.python"]);
- expect(tokens[0][7].value).toBe("[");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
- expect(tokens[0][8].value).toBe("a");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][9].value).toBe("b");
- expect(tokens[0][9].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][10].value).toBe("c");
- expect(tokens[0][10].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][11].value).toBe("]");
- expect(tokens[0][11].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
- expect(tokens[0][12].value).toBe(" ");
- expect(tokens[0][12].scopes).toEqual(["source.python","string.regexp.quoted.multi.python"]);
- expect(tokens[0][13].value).toBe("#");
- expect(tokens[0][13].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","comment.line.number-sign.python","punctuation.definition.comment.python"]);
- expect(tokens[0][14].value).toBe(" comment");
- expect(tokens[0][14].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","comment.line.number-sign.python"]);
- expect(tokens[0][15].value).toBe("'''");
- expect(tokens[0][15].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","punctuation.definition.string.end.python"]);
- });
-
- it("test/regexp/fregexp1.py",
- function() {
- tokens = grammar.tokenizeLines("a = fr'[a-z]'\na = Fr'[a-z]'\na = rf'[a-z]'\na = rF'[a-z]'")
- expect(tokens[0][0].value).toBe("a");
- expect(tokens[0][0].scopes).toEqual(["source.python"]);
- expect(tokens[0][1].value).toBe(" ");
- expect(tokens[0][1].scopes).toEqual(["source.python"]);
- expect(tokens[0][2].value).toBe("=");
- expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[0][3].value).toBe(" ");
- expect(tokens[0][3].scopes).toEqual(["source.python"]);
- expect(tokens[0][4].value).toBe("fr");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][5].value).toBe("'");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][6].value).toBe("[");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
- expect(tokens[0][7].value).toBe("a");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][8].value).toBe("-");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][9].value).toBe("z");
- expect(tokens[0][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[0][10].value).toBe("]");
- expect(tokens[0][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
- expect(tokens[0][11].value).toBe("'");
- expect(tokens[0][11].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("a");
- expect(tokens[1][0].scopes).toEqual(["source.python"]);
- expect(tokens[1][1].value).toBe(" ");
- expect(tokens[1][1].scopes).toEqual(["source.python"]);
- expect(tokens[1][2].value).toBe("=");
- expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[1][3].value).toBe(" ");
- expect(tokens[1][3].scopes).toEqual(["source.python"]);
- expect(tokens[1][4].value).toBe("Fr");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[1][5].value).toBe("'");
- expect(tokens[1][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][6].value).toBe("[");
- expect(tokens[1][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
- expect(tokens[1][7].value).toBe("a");
- expect(tokens[1][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[1][8].value).toBe("-");
- expect(tokens[1][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[1][9].value).toBe("z");
- expect(tokens[1][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[1][10].value).toBe("]");
- expect(tokens[1][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
- expect(tokens[1][11].value).toBe("'");
- expect(tokens[1][11].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[2][0].value).toBe("a");
- expect(tokens[2][0].scopes).toEqual(["source.python"]);
- expect(tokens[2][1].value).toBe(" ");
- expect(tokens[2][1].scopes).toEqual(["source.python"]);
- expect(tokens[2][2].value).toBe("=");
- expect(tokens[2][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[2][3].value).toBe(" ");
- expect(tokens[2][3].scopes).toEqual(["source.python"]);
- expect(tokens[2][4].value).toBe("rf");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[2][5].value).toBe("'");
- expect(tokens[2][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[2][6].value).toBe("[");
- expect(tokens[2][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
- expect(tokens[2][7].value).toBe("a");
- expect(tokens[2][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[2][8].value).toBe("-");
- expect(tokens[2][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[2][9].value).toBe("z");
- expect(tokens[2][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[2][10].value).toBe("]");
- expect(tokens[2][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
- expect(tokens[2][11].value).toBe("'");
- expect(tokens[2][11].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[3][0].value).toBe("a");
- expect(tokens[3][0].scopes).toEqual(["source.python"]);
- expect(tokens[3][1].value).toBe(" ");
- expect(tokens[3][1].scopes).toEqual(["source.python"]);
- expect(tokens[3][2].value).toBe("=");
- expect(tokens[3][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[3][3].value).toBe(" ");
- expect(tokens[3][3].scopes).toEqual(["source.python"]);
- expect(tokens[3][4].value).toBe("rF");
- expect(tokens[3][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[3][5].value).toBe("'");
- expect(tokens[3][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[3][6].value).toBe("[");
- expect(tokens[3][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
- expect(tokens[3][7].value).toBe("a");
- expect(tokens[3][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[3][8].value).toBe("-");
- expect(tokens[3][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[3][9].value).toBe("z");
- expect(tokens[3][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.character.set.regexp"]);
- expect(tokens[3][10].value).toBe("]");
- expect(tokens[3][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
- expect(tokens[3][11].value).toBe("'");
- expect(tokens[3][11].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- });
-
- it("test/regexp/fregexp2.py",
- function() {
- tokens = grammar.tokenizeLines("rf'fo{{2}}'\nrf\"fo{{2}}\"\nrf'''fo{{2}}'''\nrf\"\"\"fo{{2}}\"\"\"")
- expect(tokens[0][0].value).toBe("rf");
- expect(tokens[0][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][1].value).toBe("'");
- expect(tokens[0][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][2].value).toBe("fo");
- expect(tokens[0][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][3].value).toBe("{{2}}");
- expect(tokens[0][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[0][4].value).toBe("'");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("rf");
- expect(tokens[1][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[1][1].value).toBe("\"");
- expect(tokens[1][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][2].value).toBe("fo");
- expect(tokens[1][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][3].value).toBe("{{2}}");
- expect(tokens[1][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[1][4].value).toBe("\"");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[2][0].value).toBe("rf");
- expect(tokens[2][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[2][1].value).toBe("'''");
- expect(tokens[2][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[2][2].value).toBe("fo");
- expect(tokens[2][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[2][3].value).toBe("{{2}}");
- expect(tokens[2][3].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[2][4].value).toBe("'''");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[3][0].value).toBe("rf");
- expect(tokens[3][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[3][1].value).toBe("\"\"\"");
- expect(tokens[3][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[3][2].value).toBe("fo");
- expect(tokens[3][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[3][3].value).toBe("{{2}}");
- expect(tokens[3][3].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[3][4].value).toBe("\"\"\"");
- expect(tokens[3][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.end.python"]);
- });
-
- it("test/regexp/fregexp3.py",
- function() {
- tokens = grammar.tokenizeLines("rf'fo{2}'\nrf\"fo{2}\"\nrf'''fo{2}'''\nrf\"\"\"fo{2}\"\"\"")
- expect(tokens[0][0].value).toBe("rf");
- expect(tokens[0][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][1].value).toBe("'");
- expect(tokens[0][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][2].value).toBe("fo");
- expect(tokens[0][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][3].value).toBe("{2}");
- expect(tokens[0][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][4].value).toBe("'");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("rf");
- expect(tokens[1][0].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[1][1].value).toBe("\"");
- expect(tokens[1][1].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][2].value).toBe("fo");
- expect(tokens[1][2].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][3].value).toBe("{2}");
- expect(tokens[1][3].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][4].value).toBe("\"");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[2][0].value).toBe("rf");
- expect(tokens[2][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[2][1].value).toBe("'''");
- expect(tokens[2][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[2][2].value).toBe("fo");
- expect(tokens[2][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[2][3].value).toBe("{2}");
- expect(tokens[2][3].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[2][4].value).toBe("'''");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[3][0].value).toBe("rf");
- expect(tokens[3][0].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[3][1].value).toBe("\"\"\"");
- expect(tokens[3][1].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[3][2].value).toBe("fo");
- expect(tokens[3][2].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[3][3].value).toBe("{2}");
- expect(tokens[3][3].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python"]);
- expect(tokens[3][4].value).toBe("\"\"\"");
- expect(tokens[3][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python string.interpolated.python","punctuation.definition.string.end.python"]);
- });
-
- it("test/regexp/fregexp4.py",
- function() {
- tokens = grammar.tokenizeLines("a = rf'fo{{2}}'\na = r'fo{{2}}'\na = r'fo{2}'")
- expect(tokens[0][0].value).toBe("a");
- expect(tokens[0][0].scopes).toEqual(["source.python"]);
- expect(tokens[0][1].value).toBe(" ");
- expect(tokens[0][1].scopes).toEqual(["source.python"]);
- expect(tokens[0][2].value).toBe("=");
- expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[0][3].value).toBe(" ");
- expect(tokens[0][3].scopes).toEqual(["source.python"]);
- expect(tokens[0][4].value).toBe("rf");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][5].value).toBe("'");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][6].value).toBe("fo");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][7].value).toBe("{{2}}");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[0][8].value).toBe("'");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("a");
- expect(tokens[1][0].scopes).toEqual(["source.python"]);
- expect(tokens[1][1].value).toBe(" ");
- expect(tokens[1][1].scopes).toEqual(["source.python"]);
- expect(tokens[1][2].value).toBe("=");
- expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[1][3].value).toBe(" ");
- expect(tokens[1][3].scopes).toEqual(["source.python"]);
- expect(tokens[1][4].value).toBe("r");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python","storage.type.string.python"]);
- expect(tokens[1][5].value).toBe("'");
- expect(tokens[1][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][6].value).toBe("fo{");
- expect(tokens[1][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python"]);
- expect(tokens[1][7].value).toBe("{2}");
- expect(tokens[1][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[1][8].value).toBe("}");
- expect(tokens[1][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python"]);
- expect(tokens[1][9].value).toBe("'");
- expect(tokens[1][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.end.python"]);
- expect(tokens[2][0].value).toBe("a");
- expect(tokens[2][0].scopes).toEqual(["source.python"]);
- expect(tokens[2][1].value).toBe(" ");
- expect(tokens[2][1].scopes).toEqual(["source.python"]);
- expect(tokens[2][2].value).toBe("=");
- expect(tokens[2][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[2][3].value).toBe(" ");
- expect(tokens[2][3].scopes).toEqual(["source.python"]);
- expect(tokens[2][4].value).toBe("r");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python","storage.type.string.python"]);
- expect(tokens[2][5].value).toBe("'");
- expect(tokens[2][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.begin.python"]);
- expect(tokens[2][6].value).toBe("fo");
- expect(tokens[2][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python"]);
- expect(tokens[2][7].value).toBe("{2}");
- expect(tokens[2][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[2][8].value).toBe("'");
- expect(tokens[2][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.end.python"]);
+ expect(tokens[0][0].value).toBe("0");
+ expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[0][1].value).toBe("123");
+ expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.dec.python","invalid.illegal.dec.python"]);
+ expect(tokens[1][0].value).toBe("0123l");
+ expect(tokens[1][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[2][0].value).toBe("123f");
+ expect(tokens[2][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[3][0].value).toBe("123d");
+ expect(tokens[3][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[4][0].value).toBe("123A");
+ expect(tokens[4][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[5][0].value).toBe("123__456");
+ expect(tokens[5][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[6][0].value).toBe("123_");
+ expect(tokens[6][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
});
- it("test/regexp/fregexp5.py",
+ it("test/numbers/nondec.py",
function() {
- tokens = grammar.tokenizeLines("a = rf'{{foo}}'\na = r'\\{foo\\}'")
- expect(tokens[0][0].value).toBe("a");
- expect(tokens[0][0].scopes).toEqual(["source.python"]);
- expect(tokens[0][1].value).toBe(" ");
- expect(tokens[0][1].scopes).toEqual(["source.python"]);
- expect(tokens[0][2].value).toBe("=");
- expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[0][3].value).toBe(" ");
- expect(tokens[0][3].scopes).toEqual(["source.python"]);
- expect(tokens[0][4].value).toBe("rf");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][5].value).toBe("'");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][6].value).toBe("{{");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[0][7].value).toBe("foo");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][8].value).toBe("}}");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[0][9].value).toBe("'");
- expect(tokens[0][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("a");
- expect(tokens[1][0].scopes).toEqual(["source.python"]);
- expect(tokens[1][1].value).toBe(" ");
- expect(tokens[1][1].scopes).toEqual(["source.python"]);
- expect(tokens[1][2].value).toBe("=");
- expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[1][3].value).toBe(" ");
- expect(tokens[1][3].scopes).toEqual(["source.python"]);
- expect(tokens[1][4].value).toBe("r");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python","storage.type.string.python"]);
- expect(tokens[1][5].value).toBe("'");
- expect(tokens[1][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][6].value).toBe("\\{");
- expect(tokens[1][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python","constant.character.escape.regexp"]);
- expect(tokens[1][7].value).toBe("foo");
- expect(tokens[1][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python"]);
- expect(tokens[1][8].value).toBe("\\}");
- expect(tokens[1][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python","constant.character.escape.regexp"]);
- expect(tokens[1][9].value).toBe("'");
- expect(tokens[1][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python","punctuation.definition.string.end.python"]);
+ tokens = grammar.tokenizeLines("0o1234567\n0O1234567\n0o1_234_567\n0b0000\n0B0001\n0b_0011_1001\n0xabcdef01234567890\n0XFF12\n0xab_cd_ef_01_23_45_67_89_00\n\n0o\n0b\n0x\n0z\n\n0b02\n0x0z\n0o90")
+ expect(tokens[0][0].value).toBe("0o");
+ expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
+ expect(tokens[0][1].value).toBe("1234567");
+ expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
+ expect(tokens[1][0].value).toBe("0O");
+ expect(tokens[1][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
+ expect(tokens[1][1].value).toBe("1234567");
+ expect(tokens[1][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
+ expect(tokens[2][0].value).toBe("0o");
+ expect(tokens[2][0].scopes).toEqual(["source.python","constant.numeric.oct.python","storage.type.number.python"]);
+ expect(tokens[2][1].value).toBe("1_234_567");
+ expect(tokens[2][1].scopes).toEqual(["source.python","constant.numeric.oct.python"]);
+ expect(tokens[3][0].value).toBe("0b");
+ expect(tokens[3][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
+ expect(tokens[3][1].value).toBe("0000");
+ expect(tokens[3][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
+ expect(tokens[4][0].value).toBe("0B");
+ expect(tokens[4][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
+ expect(tokens[4][1].value).toBe("0001");
+ expect(tokens[4][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
+ expect(tokens[5][0].value).toBe("0b");
+ expect(tokens[5][0].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
+ expect(tokens[5][1].value).toBe("_0011_1001");
+ expect(tokens[5][1].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
+ expect(tokens[6][0].value).toBe("0x");
+ expect(tokens[6][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
+ expect(tokens[6][1].value).toBe("abcdef01234567890");
+ expect(tokens[6][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
+ expect(tokens[7][0].value).toBe("0X");
+ expect(tokens[7][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
+ expect(tokens[7][1].value).toBe("FF12");
+ expect(tokens[7][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
+ expect(tokens[8][0].value).toBe("0x");
+ expect(tokens[8][0].scopes).toEqual(["source.python","constant.numeric.hex.python","storage.type.number.python"]);
+ expect(tokens[8][1].value).toBe("ab_cd_ef_01_23_45_67_89_00");
+ expect(tokens[8][1].scopes).toEqual(["source.python","constant.numeric.hex.python"]);
+ expect(tokens[9][0].value).toBe("");
+ expect(tokens[9][0].scopes).toEqual(["source.python"]);
+ expect(tokens[10][0].value).toBe("0o");
+ expect(tokens[10][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[11][0].value).toBe("0b");
+ expect(tokens[11][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[12][0].value).toBe("0x");
+ expect(tokens[12][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[13][0].value).toBe("0z");
+ expect(tokens[13][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[14][0].value).toBe("");
+ expect(tokens[14][0].scopes).toEqual(["source.python"]);
+ expect(tokens[15][0].value).toBe("0b02");
+ expect(tokens[15][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[16][0].value).toBe("0x0z");
+ expect(tokens[16][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ expect(tokens[17][0].value).toBe("0o90");
+ expect(tokens[17][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
});
- it("test/regexp/fregexp6.py",
+ it("test/numbers/python2.py",
function() {
- tokens = grammar.tokenizeLines("a = rf'fo{{{2}}}'\na = rf'fo{{{bar}}}'\na = rf'fo{{2}}'")
+ tokens = grammar.tokenizeLines("123l\n123L\n1_234l")
+ expect(tokens[0][0].value).toBe("123");
+ expect(tokens[0][0].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
+ expect(tokens[0][1].value).toBe("l");
+ expect(tokens[0][1].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
+ expect(tokens[1][0].value).toBe("123");
+ expect(tokens[1][0].scopes).toEqual(["source.python","constant.numeric.bin.python"]);
+ expect(tokens[1][1].value).toBe("L");
+ expect(tokens[1][1].scopes).toEqual(["source.python","constant.numeric.bin.python","storage.type.number.python"]);
+ expect(tokens[2][0].value).toBe("1_234l");
+ expect(tokens[2][0].scopes).toEqual(["source.python","invalid.illegal.name.python"]);
+ });
+
+ it("test/regexp/comments1.py",
+ function() {
+ tokens = grammar.tokenizeLines("a = r'''foo[abc] # comment'''")
expect(tokens[0][0].value).toBe("a");
expect(tokens[0][0].scopes).toEqual(["source.python"]);
expect(tokens[0][1].value).toBe(" ");
@@ -10804,60 +10988,30 @@ describe("Grammar Tests", function() {
expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
expect(tokens[0][3].value).toBe(" ");
expect(tokens[0][3].scopes).toEqual(["source.python"]);
- expect(tokens[0][4].value).toBe("rf");
- expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[0][5].value).toBe("'");
- expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[0][6].value).toBe("fo");
- expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][7].value).toBe("{{");
- expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[0][8].value).toBe("{2}");
- expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[0][9].value).toBe("}}");
- expect(tokens[0][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[0][10].value).toBe("'");
- expect(tokens[0][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[1][0].value).toBe("a");
- expect(tokens[1][0].scopes).toEqual(["source.python"]);
- expect(tokens[1][1].value).toBe(" ");
- expect(tokens[1][1].scopes).toEqual(["source.python"]);
- expect(tokens[1][2].value).toBe("=");
- expect(tokens[1][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[1][3].value).toBe(" ");
- expect(tokens[1][3].scopes).toEqual(["source.python"]);
- expect(tokens[1][4].value).toBe("rf");
- expect(tokens[1][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[1][5].value).toBe("'");
- expect(tokens[1][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[1][6].value).toBe("fo");
- expect(tokens[1][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][7].value).toBe("{{");
- expect(tokens[1][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[1][8].value).toBe("{bar}");
- expect(tokens[1][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[1][9].value).toBe("}}");
- expect(tokens[1][9].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","constant.character.escape.python"]);
- expect(tokens[1][10].value).toBe("'");
- expect(tokens[1][10].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
- expect(tokens[2][0].value).toBe("a");
- expect(tokens[2][0].scopes).toEqual(["source.python"]);
- expect(tokens[2][1].value).toBe(" ");
- expect(tokens[2][1].scopes).toEqual(["source.python"]);
- expect(tokens[2][2].value).toBe("=");
- expect(tokens[2][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
- expect(tokens[2][3].value).toBe(" ");
- expect(tokens[2][3].scopes).toEqual(["source.python"]);
- expect(tokens[2][4].value).toBe("rf");
- expect(tokens[2][4].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","storage.type.string.python"]);
- expect(tokens[2][5].value).toBe("'");
- expect(tokens[2][5].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.begin.python"]);
- expect(tokens[2][6].value).toBe("fo");
- expect(tokens[2][6].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python"]);
- expect(tokens[2][7].value).toBe("{{2}}");
- expect(tokens[2][7].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","keyword.operator.quantifier.regexp"]);
- expect(tokens[2][8].value).toBe("'");
- expect(tokens[2][8].scopes).toEqual(["source.python","string.regexp.quoted.single.python string.interpolated.python","punctuation.definition.string.end.python"]);
+ expect(tokens[0][4].value).toBe("r");
+ expect(tokens[0][4].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","storage.type.string.python"]);
+ expect(tokens[0][5].value).toBe("'''");
+ expect(tokens[0][5].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[0][6].value).toBe("foo");
+ expect(tokens[0][6].scopes).toEqual(["source.python","string.regexp.quoted.multi.python"]);
+ expect(tokens[0][7].value).toBe("[");
+ expect(tokens[0][7].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
+ expect(tokens[0][8].value).toBe("a");
+ expect(tokens[0][8].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
+ expect(tokens[0][9].value).toBe("b");
+ expect(tokens[0][9].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
+ expect(tokens[0][10].value).toBe("c");
+ expect(tokens[0][10].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.character.set.regexp"]);
+ expect(tokens[0][11].value).toBe("]");
+ expect(tokens[0][11].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
+ expect(tokens[0][12].value).toBe(" ");
+ expect(tokens[0][12].scopes).toEqual(["source.python","string.regexp.quoted.multi.python"]);
+ expect(tokens[0][13].value).toBe("#");
+ expect(tokens[0][13].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","comment.line.number-sign.python","punctuation.definition.comment.python"]);
+ expect(tokens[0][14].value).toBe(" comment");
+ expect(tokens[0][14].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","comment.line.number-sign.python"]);
+ expect(tokens[0][15].value).toBe("'''");
+ expect(tokens[0][15].scopes).toEqual(["source.python","string.regexp.quoted.multi.python","punctuation.definition.string.end.python"]);
});
it("test/regexp/python1.py",
@@ -13020,6 +13174,214 @@ describe("Grammar Tests", function() {
expect(tokens[8][11].scopes).toEqual(["source.python","constant.language.python"]);
});
+ it("test/statements/match1.py",
+ function() {
+ tokens = grammar.tokenizeLines("match status:\n case 100:\n pass\n case \\\n 200:\n pass\n case (\n 300\n ):\n pass\n case [\n 400\n ]:\n pass\n case {\n 500: \"\",\n }:\n pass\n case Point(x, y) as p:\n pass\n case 600 | 700:\n pass\n case _:")
+ expect(tokens[0][0].value).toBe("match");
+ expect(tokens[0][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("status");
+ expect(tokens[0][2].scopes).toEqual(["source.python"]);
+ expect(tokens[0][3].value).toBe(":");
+ expect(tokens[0][3].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[1][0].value).toBe(" case");
+ expect(tokens[1][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[1][1].value).toBe(" ");
+ expect(tokens[1][1].scopes).toEqual(["source.python"]);
+ expect(tokens[1][2].value).toBe("100");
+ expect(tokens[1][2].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[1][3].value).toBe(":");
+ expect(tokens[1][3].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[2][0].value).toBe(" ");
+ expect(tokens[2][0].scopes).toEqual(["source.python"]);
+ expect(tokens[2][1].value).toBe("pass");
+ expect(tokens[2][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[3][0].value).toBe(" case");
+ expect(tokens[3][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[3][1].value).toBe(" ");
+ expect(tokens[3][1].scopes).toEqual(["source.python"]);
+ expect(tokens[3][2].value).toBe("\\");
+ expect(tokens[3][2].scopes).toEqual(["source.python","punctuation.separator.continuation.line.python"]);
+ expect(tokens[3][3].value).toBe("");
+ expect(tokens[3][3].scopes).toEqual(["source.python"]);
+ expect(tokens[4][0].value).toBe(" ");
+ expect(tokens[4][0].scopes).toEqual(["source.python"]);
+ expect(tokens[4][1].value).toBe("200");
+ expect(tokens[4][1].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[4][2].value).toBe(":");
+ expect(tokens[4][2].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[5][0].value).toBe(" ");
+ expect(tokens[5][0].scopes).toEqual(["source.python"]);
+ expect(tokens[5][1].value).toBe("pass");
+ expect(tokens[5][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[6][0].value).toBe(" case");
+ expect(tokens[6][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[6][1].value).toBe(" ");
+ expect(tokens[6][1].scopes).toEqual(["source.python"]);
+ expect(tokens[6][2].value).toBe("(");
+ expect(tokens[6][2].scopes).toEqual(["source.python","punctuation.parenthesis.begin.python"]);
+ expect(tokens[7][0].value).toBe(" ");
+ expect(tokens[7][0].scopes).toEqual(["source.python"]);
+ expect(tokens[7][1].value).toBe("300");
+ expect(tokens[7][1].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[8][0].value).toBe(" ");
+ expect(tokens[8][0].scopes).toEqual(["source.python"]);
+ expect(tokens[8][1].value).toBe(")");
+ expect(tokens[8][1].scopes).toEqual(["source.python","punctuation.parenthesis.end.python"]);
+ expect(tokens[8][2].value).toBe(":");
+ expect(tokens[8][2].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[9][0].value).toBe(" ");
+ expect(tokens[9][0].scopes).toEqual(["source.python"]);
+ expect(tokens[9][1].value).toBe("pass");
+ expect(tokens[9][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[10][0].value).toBe(" case");
+ expect(tokens[10][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[10][1].value).toBe(" ");
+ expect(tokens[10][1].scopes).toEqual(["source.python"]);
+ expect(tokens[10][2].value).toBe("[");
+ expect(tokens[10][2].scopes).toEqual(["source.python","punctuation.definition.list.begin.python"]);
+ expect(tokens[11][0].value).toBe(" ");
+ expect(tokens[11][0].scopes).toEqual(["source.python"]);
+ expect(tokens[11][1].value).toBe("400");
+ expect(tokens[11][1].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[12][0].value).toBe(" ");
+ expect(tokens[12][0].scopes).toEqual(["source.python"]);
+ expect(tokens[12][1].value).toBe("]");
+ expect(tokens[12][1].scopes).toEqual(["source.python","punctuation.definition.list.end.python"]);
+ expect(tokens[12][2].value).toBe(":");
+ expect(tokens[12][2].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[13][0].value).toBe(" ");
+ expect(tokens[13][0].scopes).toEqual(["source.python"]);
+ expect(tokens[13][1].value).toBe("pass");
+ expect(tokens[13][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[14][0].value).toBe(" case");
+ expect(tokens[14][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[14][1].value).toBe(" ");
+ expect(tokens[14][1].scopes).toEqual(["source.python"]);
+ expect(tokens[14][2].value).toBe("{");
+ expect(tokens[14][2].scopes).toEqual(["source.python","punctuation.definition.dict.begin.python"]);
+ expect(tokens[15][0].value).toBe(" ");
+ expect(tokens[15][0].scopes).toEqual(["source.python"]);
+ expect(tokens[15][1].value).toBe("500");
+ expect(tokens[15][1].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[15][2].value).toBe(":");
+ expect(tokens[15][2].scopes).toEqual(["source.python","punctuation.separator.dict.python"]);
+ expect(tokens[15][3].value).toBe(" ");
+ expect(tokens[15][3].scopes).toEqual(["source.python"]);
+ expect(tokens[15][4].value).toBe("\"");
+ expect(tokens[15][4].scopes).toEqual(["source.python","string.quoted.single.python","punctuation.definition.string.begin.python"]);
+ expect(tokens[15][5].value).toBe("\"");
+ expect(tokens[15][5].scopes).toEqual(["source.python","string.quoted.single.python","punctuation.definition.string.end.python"]);
+ expect(tokens[15][6].value).toBe(",");
+ expect(tokens[15][6].scopes).toEqual(["source.python","punctuation.separator.element.python"]);
+ expect(tokens[16][0].value).toBe(" ");
+ expect(tokens[16][0].scopes).toEqual(["source.python"]);
+ expect(tokens[16][1].value).toBe("}");
+ expect(tokens[16][1].scopes).toEqual(["source.python","punctuation.definition.dict.end.python"]);
+ expect(tokens[16][2].value).toBe(":");
+ expect(tokens[16][2].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[17][0].value).toBe(" ");
+ expect(tokens[17][0].scopes).toEqual(["source.python"]);
+ expect(tokens[17][1].value).toBe("pass");
+ expect(tokens[17][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[18][0].value).toBe(" case");
+ expect(tokens[18][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[18][1].value).toBe(" ");
+ expect(tokens[18][1].scopes).toEqual(["source.python"]);
+ expect(tokens[18][2].value).toBe("Point");
+ expect(tokens[18][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.generic.python"]);
+ expect(tokens[18][3].value).toBe("(");
+ expect(tokens[18][3].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
+ expect(tokens[18][4].value).toBe("x");
+ expect(tokens[18][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
+ expect(tokens[18][5].value).toBe(",");
+ expect(tokens[18][5].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","punctuation.separator.arguments.python"]);
+ expect(tokens[18][6].value).toBe(" ");
+ expect(tokens[18][6].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
+ expect(tokens[18][7].value).toBe("y");
+ expect(tokens[18][7].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
+ expect(tokens[18][8].value).toBe(")");
+ expect(tokens[18][8].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
+ expect(tokens[18][9].value).toBe(" ");
+ expect(tokens[18][9].scopes).toEqual(["source.python"]);
+ expect(tokens[18][10].value).toBe("as");
+ expect(tokens[18][10].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[18][11].value).toBe(" ");
+ expect(tokens[18][11].scopes).toEqual(["source.python"]);
+ expect(tokens[18][12].value).toBe("p");
+ expect(tokens[18][12].scopes).toEqual(["source.python"]);
+ expect(tokens[18][13].value).toBe(":");
+ expect(tokens[18][13].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[19][0].value).toBe(" ");
+ expect(tokens[19][0].scopes).toEqual(["source.python"]);
+ expect(tokens[19][1].value).toBe("pass");
+ expect(tokens[19][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[20][0].value).toBe(" case");
+ expect(tokens[20][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[20][1].value).toBe(" ");
+ expect(tokens[20][1].scopes).toEqual(["source.python"]);
+ expect(tokens[20][2].value).toBe("600");
+ expect(tokens[20][2].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[20][3].value).toBe(" ");
+ expect(tokens[20][3].scopes).toEqual(["source.python"]);
+ expect(tokens[20][4].value).toBe("|");
+ expect(tokens[20][4].scopes).toEqual(["source.python","keyword.operator.bitwise.python"]);
+ expect(tokens[20][5].value).toBe(" ");
+ expect(tokens[20][5].scopes).toEqual(["source.python"]);
+ expect(tokens[20][6].value).toBe("700");
+ expect(tokens[20][6].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[20][7].value).toBe(":");
+ expect(tokens[20][7].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[21][0].value).toBe(" ");
+ expect(tokens[21][0].scopes).toEqual(["source.python"]);
+ expect(tokens[21][1].value).toBe("pass");
+ expect(tokens[21][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[22][0].value).toBe(" case");
+ expect(tokens[22][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[22][1].value).toBe(" ");
+ expect(tokens[22][1].scopes).toEqual(["source.python"]);
+ expect(tokens[22][2].value).toBe("_");
+ expect(tokens[22][2].scopes).toEqual(["source.python"]);
+ expect(tokens[22][3].value).toBe(":");
+ expect(tokens[22][3].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ });
+
+ it("test/statements/match2.py",
+ function() {
+ tokens = grammar.tokenizeLines("match = 1\nif match == 2:\n pass")
+ expect(tokens[0][0].value).toBe("match");
+ expect(tokens[0][0].scopes).toEqual(["source.python"]);
+ expect(tokens[0][1].value).toBe(" ");
+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
+ expect(tokens[0][2].value).toBe("=");
+ expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
+ expect(tokens[0][3].value).toBe(" ");
+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
+ expect(tokens[0][4].value).toBe("1");
+ expect(tokens[0][4].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[1][0].value).toBe("if");
+ expect(tokens[1][0].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ expect(tokens[1][1].value).toBe(" ");
+ expect(tokens[1][1].scopes).toEqual(["source.python"]);
+ expect(tokens[1][2].value).toBe("match");
+ expect(tokens[1][2].scopes).toEqual(["source.python"]);
+ expect(tokens[1][3].value).toBe(" ");
+ expect(tokens[1][3].scopes).toEqual(["source.python"]);
+ expect(tokens[1][4].value).toBe("==");
+ expect(tokens[1][4].scopes).toEqual(["source.python","keyword.operator.comparison.python"]);
+ expect(tokens[1][5].value).toBe(" ");
+ expect(tokens[1][5].scopes).toEqual(["source.python"]);
+ expect(tokens[1][6].value).toBe("2");
+ expect(tokens[1][6].scopes).toEqual(["source.python","constant.numeric.dec.python"]);
+ expect(tokens[1][7].value).toBe(":");
+ expect(tokens[1][7].scopes).toEqual(["source.python","punctuation.separator.colon.python"]);
+ expect(tokens[2][0].value).toBe(" ");
+ expect(tokens[2][0].scopes).toEqual(["source.python"]);
+ expect(tokens[2][1].value).toBe("pass");
+ expect(tokens[2][1].scopes).toEqual(["source.python","keyword.control.flow.python"]);
+ });
+
it("test/statements/nonlocal1.py",
function() {
tokens = grammar.tokenizeLines("nonlocal a, b, c")
diff --git a/test/expressions/expr21.py b/test/expressions/expr21.py
new file mode 100644
index 00000000..59556710
--- /dev/null
+++ b/test/expressions/expr21.py
@@ -0,0 +1,39 @@
+while chunk := file.read(8192):
+ process(chunk)
+ y0 = (y1 := f(x))
+
+
+
+while : keyword.control.flow.python, source.python
+ : source.python
+chunk : source.python
+ : source.python
+:= : keyword.operator.assignment.python, source.python
+ : source.python
+file : source.python, variable.legacy.builtin.python
+. : meta.member.access.python, punctuation.separator.period.python, source.python
+read : meta.function-call.generic.python, meta.function-call.python, meta.member.access.python, source.python
+( : meta.function-call.python, meta.member.access.python, punctuation.definition.arguments.begin.python, source.python
+8192 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, meta.member.access.python, source.python
+) : meta.function-call.python, meta.member.access.python, punctuation.definition.arguments.end.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+process : meta.function-call.generic.python, meta.function-call.python, source.python
+( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
+chunk : meta.function-call.arguments.python, meta.function-call.python, source.python
+) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
+ : source.python
+y0 : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+( : punctuation.parenthesis.begin.python, source.python
+y1 : source.python
+ : source.python
+:= : keyword.operator.assignment.python, source.python
+ : source.python
+f : meta.function-call.generic.python, meta.function-call.python, source.python
+( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
+x : meta.function-call.arguments.python, meta.function-call.python, source.python
+) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
+) : punctuation.parenthesis.end.python, source.python
diff --git a/test/fstrings/empty2.py b/test/fstrings/empty2.py
index 77dc9087..9a007e14 100644
--- a/test/fstrings/empty2.py
+++ b/test/fstrings/empty2.py
@@ -7,20 +7,22 @@
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-{ : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-} : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
- : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{ : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
- : invalid.illegal.brace.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-} : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{ : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-} : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{ : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
- : invalid.illegal.brace.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-} : constant.character.format.placeholder.other.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : invalid.illegal.brace.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python
+""" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : invalid.illegal.brace.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+""" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
diff --git a/test/fstrings/fraw1.py b/test/fstrings/fraw1.py
new file mode 100644
index 00000000..31e2196e
--- /dev/null
+++ b/test/fstrings/fraw1.py
@@ -0,0 +1,40 @@
+a = fr'[a-z]'
+a = Fr'[a-z]'
+a = rf'[a-z]'
+a = rF'[a-z]'
+
+
+
+
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+Fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+rF : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
diff --git a/test/fstrings/fraw2.py b/test/fstrings/fraw2.py
new file mode 100644
index 00000000..df0a2fed
--- /dev/null
+++ b/test/fstrings/fraw2.py
@@ -0,0 +1,36 @@
+rf'fo{{2}}'
+rf"fo{{2}}"
+rf'''fo{{2}}'''
+rf"""fo{{2}}"""
+
+
+
+
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python
+''' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+''' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python
+""" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+""" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
diff --git a/test/fstrings/fraw3.py b/test/fstrings/fraw3.py
new file mode 100644
index 00000000..da1a6aff
--- /dev/null
+++ b/test/fstrings/fraw3.py
@@ -0,0 +1,36 @@
+rf'fo{2}'
+rf"fo{2}"
+rf'''fo{2}'''
+rf"""fo{2}"""
+
+
+
+
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+2 : constant.numeric.dec.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+2 : constant.numeric.dec.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python
+''' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+2 : constant.numeric.dec.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+''' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python
+""" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+2 : constant.numeric.dec.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+""" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python
diff --git a/test/fstrings/fraw4.py b/test/fstrings/fraw4.py
new file mode 100644
index 00000000..2bf2d465
--- /dev/null
+++ b/test/fstrings/fraw4.py
@@ -0,0 +1,45 @@
+a = rf'fo{{{2}}}'
+a = rf'fo{{{bar}}}'
+a = rf'fo{{2}}'
+
+
+
+
+
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+2 : constant.numeric.dec.python, meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+bar : meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+a : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{{ : constant.character.escape.python, meta.fstring.python, source.python
+2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+}} : constant.character.escape.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
diff --git a/test/fstrings/prefixes2.py b/test/fstrings/prefixes2.py
index 861d2b66..78ee4246 100644
--- a/test/fstrings/prefixes2.py
+++ b/test/fstrings/prefixes2.py
@@ -22,16 +22,20 @@
obj : meta.fstring.python, source.python
} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-some : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{obj} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rF : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-some : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{obj} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
+rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+obj : meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+rF : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+obj : meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
Rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
diff --git a/test/fstrings/prefixes3.py b/test/fstrings/prefixes3.py
index 200fa896..46d12ffb 100644
--- a/test/fstrings/prefixes3.py
+++ b/test/fstrings/prefixes3.py
@@ -6,16 +6,20 @@
-fr : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-some : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{obj} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-Fr : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-some : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{obj} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
+fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+obj : meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+Fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
+some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+obj : meta.fstring.python, source.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python
fR : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python
some : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python
diff --git a/test/fstrings/simple10.py b/test/fstrings/simple10.py
new file mode 100644
index 00000000..ae793021
--- /dev/null
+++ b/test/fstrings/simple10.py
@@ -0,0 +1,18 @@
+f'values: {a=} {b=!r}'
+
+
+
+
+f : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.single.python
+' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.quoted.single.python
+values: : meta.fstring.python, source.python, string.interpolated.python, string.quoted.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+a : meta.fstring.python, source.python
+= : meta.fstring.python, source.python, storage.type.format.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+ : meta.fstring.python, source.python, string.interpolated.python, string.quoted.single.python
+{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+b : meta.fstring.python, source.python
+=!r : meta.fstring.python, source.python, storage.type.format.python
+} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python
+' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.single.python
diff --git a/test/functions/decl15.py b/test/functions/decl15.py
new file mode 100644
index 00000000..7f5c4ecc
--- /dev/null
+++ b/test/functions/decl15.py
@@ -0,0 +1,34 @@
+def showcase(a, b, /, c, d, *, e, f):
+ return
+
+
+
+
+def : meta.function.python, source.python, storage.type.function.python
+ : meta.function.python, source.python
+showcase : entity.name.function.python, meta.function.python, source.python
+( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
+a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.parameters.python, meta.function.python, source.python
+b : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.parameters.python, meta.function.python, source.python
+/ : keyword.operator.positional.parameter.python, meta.function.parameters.python, meta.function.python, source.python
+, : meta.function.parameters.python, meta.function.python, source.python
+c : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.parameters.python, meta.function.python, source.python
+d : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.parameters.python, meta.function.python, source.python
+* : keyword.operator.unpacking.parameter.python, meta.function.parameters.python, meta.function.python, source.python
+, : meta.function.parameters.python, meta.function.python, source.python
+e : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.parameters.python, meta.function.python, source.python
+f : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
+) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
+: : meta.function.python, punctuation.section.function.begin.python, source.python
+ : source.python
+return : keyword.control.flow.python, source.python
diff --git a/test/functions/lambda10.py b/test/functions/lambda10.py
new file mode 100644
index 00000000..c033ac71
--- /dev/null
+++ b/test/functions/lambda10.py
@@ -0,0 +1,35 @@
+showcase = lambda a, /, b, *, c: (a + b + c)
+
+
+
+
+showcase : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+lambda : meta.lambda-function.python, source.python, storage.type.function.lambda.python
+ : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+a : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python, variable.parameter.function.language.python
+, : meta.function.lambda.parameters.python, meta.lambda-function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+/ : keyword.operator.positional.parameter.python, meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+, : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+b : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python, variable.parameter.function.language.python
+, : meta.function.lambda.parameters.python, meta.lambda-function.python, punctuation.separator.parameters.python, source.python
+ : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+* : keyword.operator.unpacking.parameter.python, meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+, : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python
+c : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python, variable.parameter.function.language.python
+: : meta.lambda-function.python, punctuation.section.function.lambda.begin.python, source.python
+ : source.python
+( : punctuation.parenthesis.begin.python, source.python
+a : source.python
+ : source.python
++ : keyword.operator.arithmetic.python, source.python
+ : source.python
+b : source.python
+ : source.python
++ : keyword.operator.arithmetic.python, source.python
+ : source.python
+c : source.python
+) : punctuation.parenthesis.end.python, source.python
diff --git a/test/regexp/fregexp1.py b/test/regexp/fregexp1.py
deleted file mode 100644
index 9e77d66b..00000000
--- a/test/regexp/fregexp1.py
+++ /dev/null
@@ -1,56 +0,0 @@
-a = fr'[a-z]'
-a = Fr'[a-z]'
-a = rf'[a-z]'
-a = rF'[a-z]'
-
-
-
-
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-fr : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-- : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-z : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-Fr : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-- : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-z : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-- : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-z : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rF : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-- : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-z : constant.character.set.regexp, meta.character.set.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
diff --git a/test/regexp/fregexp2.py b/test/regexp/fregexp2.py
deleted file mode 100644
index 72eccc28..00000000
--- a/test/regexp/fregexp2.py
+++ /dev/null
@@ -1,28 +0,0 @@
-rf'fo{{2}}'
-rf"fo{{2}}"
-rf'''fo{{2}}'''
-rf"""fo{{2}}"""
-
-
-
-
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.multi.python
-''' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-''' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
diff --git a/test/regexp/fregexp3.py b/test/regexp/fregexp3.py
deleted file mode 100644
index ede8a6c3..00000000
--- a/test/regexp/fregexp3.py
+++ /dev/null
@@ -1,28 +0,0 @@
-rf'fo{2}'
-rf"fo{2}"
-rf'''fo{2}'''
-rf"""fo{2}"""
-
-
-
-
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{2} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{2} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.multi.python
-''' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{2} : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-''' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-{2} : source.python, string.interpolated.python, string.regexp.quoted.multi.python
-""" : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.multi.python
diff --git a/test/regexp/fregexp4.py b/test/regexp/fregexp4.py
deleted file mode 100644
index 5b707ad3..00000000
--- a/test/regexp/fregexp4.py
+++ /dev/null
@@ -1,36 +0,0 @@
-a = rf'fo{{2}}'
-a = r'fo{{2}}'
-a = r'fo{2}'
-
-
-
-
-
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-r : source.python, storage.type.string.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
-fo{ : source.python, string.regexp.quoted.single.python
-{2} : keyword.operator.quantifier.regexp, source.python, string.regexp.quoted.single.python
-} : source.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-r : source.python, storage.type.string.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
-fo : source.python, string.regexp.quoted.single.python
-{2} : keyword.operator.quantifier.regexp, source.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
diff --git a/test/regexp/fregexp5.py b/test/regexp/fregexp5.py
deleted file mode 100644
index 0d339e27..00000000
--- a/test/regexp/fregexp5.py
+++ /dev/null
@@ -1,26 +0,0 @@
-a = rf'{{foo}}'
-a = r'\{foo\}'
-
-
-
-
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{ : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-foo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-}} : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-r : source.python, storage.type.string.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
-\{ : constant.character.escape.regexp, source.python, string.regexp.quoted.single.python
-foo : source.python, string.regexp.quoted.single.python
-\} : constant.character.escape.regexp, source.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
diff --git a/test/regexp/fregexp6.py b/test/regexp/fregexp6.py
deleted file mode 100644
index a51311d0..00000000
--- a/test/regexp/fregexp6.py
+++ /dev/null
@@ -1,39 +0,0 @@
-a = rf'fo{{{2}}}'
-a = rf'fo{{{bar}}}'
-a = rf'fo{{2}}'
-
-
-
-
-
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{ : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-{2} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-}} : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{ : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-{bar} : source.python, string.interpolated.python, string.regexp.quoted.single.python
-}} : constant.character.escape.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-a : source.python
- : source.python
-= : keyword.operator.assignment.python, source.python
- : source.python
-rf : source.python, storage.type.string.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.begin.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
-fo : source.python, string.interpolated.python, string.regexp.quoted.single.python
-{{2}} : keyword.operator.quantifier.regexp, source.python, string.interpolated.python, string.regexp.quoted.single.python
-' : punctuation.definition.string.end.python, source.python, string.interpolated.python, string.regexp.quoted.single.python
diff --git a/test/statements/match1.py b/test/statements/match1.py
new file mode 100644
index 00000000..e0cebf7b
--- /dev/null
+++ b/test/statements/match1.py
@@ -0,0 +1,110 @@
+match status:
+ case 100:
+ pass
+ case \
+ 200:
+ pass
+ case (
+ 300
+ ):
+ pass
+ case [
+ 400
+ ]:
+ pass
+ case {
+ 500: "",
+ }:
+ pass
+ case Point(x, y) as p:
+ pass
+ case 600 | 700:
+ pass
+ case _:
+
+
+
+match : keyword.control.flow.python, source.python
+ : source.python
+status : source.python
+: : punctuation.separator.colon.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+100 : constant.numeric.dec.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+\ : punctuation.separator.continuation.line.python, source.python
+ : source.python
+ : source.python
+200 : constant.numeric.dec.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+( : punctuation.parenthesis.begin.python, source.python
+ : source.python
+300 : constant.numeric.dec.python, source.python
+ : source.python
+) : punctuation.parenthesis.end.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+[ : punctuation.definition.list.begin.python, source.python
+ : source.python
+400 : constant.numeric.dec.python, source.python
+ : source.python
+] : punctuation.definition.list.end.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+{ : punctuation.definition.dict.begin.python, source.python
+ : source.python
+500 : constant.numeric.dec.python, source.python
+: : punctuation.separator.dict.python, source.python
+ : source.python
+" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
+" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
+, : punctuation.separator.element.python, source.python
+ : source.python
+} : punctuation.definition.dict.end.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+Point : meta.function-call.generic.python, meta.function-call.python, source.python
+( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
+x : meta.function-call.arguments.python, meta.function-call.python, source.python
+, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
+ : meta.function-call.arguments.python, meta.function-call.python, source.python
+y : meta.function-call.arguments.python, meta.function-call.python, source.python
+) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
+ : source.python
+as : keyword.control.flow.python, source.python
+ : source.python
+p : source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+600 : constant.numeric.dec.python, source.python
+ : source.python
+| : keyword.operator.bitwise.python, source.python
+ : source.python
+700 : constant.numeric.dec.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python
+ case : keyword.control.flow.python, source.python
+ : source.python
+_ : source.python
+: : punctuation.separator.colon.python, source.python
diff --git a/test/statements/match2.py b/test/statements/match2.py
new file mode 100644
index 00000000..5f600910
--- /dev/null
+++ b/test/statements/match2.py
@@ -0,0 +1,21 @@
+match = 1
+if match == 2:
+ pass
+
+
+
+match : source.python
+ : source.python
+= : keyword.operator.assignment.python, source.python
+ : source.python
+1 : constant.numeric.dec.python, source.python
+if : keyword.control.flow.python, source.python
+ : source.python
+match : source.python
+ : source.python
+== : keyword.operator.comparison.python, source.python
+ : source.python
+2 : constant.numeric.dec.python, source.python
+: : punctuation.separator.colon.python, source.python
+ : source.python
+pass : keyword.control.flow.python, source.python