aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/python
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-12-24 12:52:21 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit10dd49958c96f86c8247c715bd20a6681afc1d8b (patch)
tree511849caff160e818f4dd08a6106137dcadb620d /tests/query/highlights/python
parentfeat(injections): add printf format strings (diff)
downloadnvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.gz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.bz2
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.lz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.xz
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.tar.zst
nvim-treesitter-10dd49958c96f86c8247c715bd20a6681afc1d8b.zip
chore(tests): consistent captures
Diffstat (limited to 'tests/query/highlights/python')
-rw-r--r--tests/query/highlights/python/pattern_matching.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/query/highlights/python/pattern_matching.py b/tests/query/highlights/python/pattern_matching.py
index 2d7d7d0c0..cd359a48f 100644
--- a/tests/query/highlights/python/pattern_matching.py
+++ b/tests/query/highlights/python/pattern_matching.py
@@ -1,51 +1,51 @@
match command.split():
-# ^ conditional
+# ^ @conditional
case ["quit"]:
- # ^ conditional
+ # ^ @conditional
print("Goodbye!")
quit_game()
case ["look"]:
- # ^ conditional
+ # ^ @conditional
current_room.describe()
case ["get", obj]:
- # ^ conditional
+ # ^ @conditional
character.get(obj, current_room)
case ["go", direction]:
- # ^ conditional
+ # ^ @conditional
current_room = current_room.neighbor(direction)
# The rest of your commands go here
match command.split():
-# ^ conditional
+# ^ @conditional
case ["drop", *objects]:
- # ^ conditional
+ # ^ @conditional
for obj in objects:
character.drop(obj, current_room)
match command.split():
-# ^ conditional
+# ^ @conditional
case ["quit"]: ... # Code omitted for brevity
case ["go", direction]: pass
case ["drop", *objects]: pass
case _:
print(f"Sorry, I couldn't understand {command!r}")
- # ^^ @function.macro
+ # ^^ @@function.macro
match command.split():
-# ^ conditional
+# ^ @conditional
case ["north"] | ["go", "north"]:
- # ^ conditional
+ # ^ @conditional
current_room = current_room.neighbor("north")
case ["get", obj] | ["pick", "up", obj] | ["pick", obj, "up"]:
- # ^ conditional
+ # ^ @conditional
pass
match = 2
-# ^ variable
+# ^ @variable
match, a = 2, 3
-# ^ variable
+# ^ @variable
match: int = secret
-# ^ variable
+# ^ @variable
x, match: str = 2, "hey, what's up?"
-# <- variable
-# ^ variable
+# <- @variable
+# ^ @variable