aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexilla/test/examples/python
diff options
context:
space:
mode:
Diffstat (limited to 'lexilla/test/examples/python')
-rw-r--r--lexilla/test/examples/python/SciTE.properties2
-rw-r--r--lexilla/test/examples/python/x.py11
-rw-r--r--lexilla/test/examples/python/x.py.new11
-rw-r--r--lexilla/test/examples/python/x.py.styled11
4 files changed, 35 insertions, 0 deletions
diff --git a/lexilla/test/examples/python/SciTE.properties b/lexilla/test/examples/python/SciTE.properties
new file mode 100644
index 000000000..164a30d52
--- /dev/null
+++ b/lexilla/test/examples/python/SciTE.properties
@@ -0,0 +1,2 @@
+lexer.*.py=python
+keywords.*.py=class def else for if import in print return while
diff --git a/lexilla/test/examples/python/x.py b/lexilla/test/examples/python/x.py
new file mode 100644
index 000000000..12c4b71df
--- /dev/null
+++ b/lexilla/test/examples/python/x.py
@@ -0,0 +1,11 @@
+# Convert all punctuation characters except '_', '*', and '.' into spaces.
+def depunctuate(s):
+ '''A docstring'''
+ """Docstring 2"""
+ d = ""
+ for ch in s:
+ if ch in 'abcde':
+ d = d + ch
+ else:
+ d = d + " "
+ return d
diff --git a/lexilla/test/examples/python/x.py.new b/lexilla/test/examples/python/x.py.new
new file mode 100644
index 000000000..983c3b83c
--- /dev/null
+++ b/lexilla/test/examples/python/x.py.new
@@ -0,0 +1,11 @@
+{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}
+{5}def{0} {9}depunctuate{10}({11}s{10}):{0}
+ {6}'''A docstring'''{0}
+ {7}"""Docstring 2"""{0}
+ {11}d{0} {10}={0} {3}""{0}
+ {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}
+ {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}
+ {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}
+ {5}else{10}:{0}
+ {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
+ {5}return{0} {11}d{0}
diff --git a/lexilla/test/examples/python/x.py.styled b/lexilla/test/examples/python/x.py.styled
new file mode 100644
index 000000000..02f94a923
--- /dev/null
+++ b/lexilla/test/examples/python/x.py.styled
@@ -0,0 +1,11 @@
+{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}
+{5}def{0} {9}depunctuate{10}({11}s{10}):{0}
+ {6}'''A docstring'''{0}
+ {7}"""Docstring 2"""{0}
+ {11}d{0} {10}={0} {3}""{0}
+ {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}
+ {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}
+ {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}
+ {5}else{10}:{0}
+ {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
+ {5}return{0} {11}d{0}