aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights/python
diff options
context:
space:
mode:
Diffstat (limited to 'tests/query/highlights/python')
-rw-r--r--tests/query/highlights/python/regex.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/query/highlights/python/regex.py b/tests/query/highlights/python/regex.py
new file mode 100644
index 000000000..385ec7760
--- /dev/null
+++ b/tests/query/highlights/python/regex.py
@@ -0,0 +1,19 @@
+import re
+
+re_test = re.compile(r"^(?P<year>\d{4}) (?P<day>\d) \w\s{,3}$")
+# ^ @string.regexp
+re_test = re.compile(
+ # comment
+ # ^ @comment
+ r"^(?P<year>\d{4}){1}"
+ # ^ @string.regexp
+ # comment
+ # ^ @comment
+ r"(?P<day>\d) \w\s{,3}"
+ # ^ @string.regexp
+ # comment
+ # ^ @comment
+)
+# interpolation
+print("foo %s bar %d" % ("arg1", 2))
+# ^ @character