None | TI(T.NEWLINE) | TI(T.INDENT) | TI(string=":"),
TI(string="match"),
TI(T.NUMBER | T.STRING | T.FSTRING_START | T.TSTRING_START)
- | TI(T.OP, string="(" | "*" | "[" | "{" | "~" | "...")
+ | TI(T.OP, string="(" | "*" | "-" | "+" | "[" | "{" | "~" | "...")
):
return True
case (
("set", [("set", "builtin")]),
("list", [("list", "builtin")]),
(" \n dict", [("dict", "builtin")]),
+ (
+ "match +1",
+ [
+ ("match", "soft_keyword"),
+ ("+", "op"),
+ ("1", "number"),
+ ],
+ ),
+ (
+ "match -1",
+ [
+ ("match", "soft_keyword"),
+ ("-", "op"),
+ ("1", "number"),
+ ],
+ ),
]
for code, expected_highlights in cases:
with self.subTest(code=code):