diff options
author | Neil <nyamatongwe@gmail.com> | 2020-04-13 21:18:05 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-04-13 21:18:05 +1000 |
commit | 32c674e84b7e081e05e48fcbf38f096f3cd43069 (patch) | |
tree | 51afd5f0e3ff4a839adb7b7a7767c249b790c4a7 /lexilla/test/examples/python/AllStyles.py | |
parent | 9e0bf7cabaa1441baa65f0e60c3081dbdb51374a (diff) | |
download | scintilla-mirror-32c674e84b7e081e05e48fcbf38f096f3cd43069.tar.gz |
Add test that illustrates all Python styles.
Diffstat (limited to 'lexilla/test/examples/python/AllStyles.py')
-rw-r--r-- | lexilla/test/examples/python/AllStyles.py | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/lexilla/test/examples/python/AllStyles.py b/lexilla/test/examples/python/AllStyles.py new file mode 100644 index 000000000..a93df7500 --- /dev/null +++ b/lexilla/test/examples/python/AllStyles.py @@ -0,0 +1,63 @@ +# Enumerate all styles: 0 to 19 +# comment=1 + +# whitespace=0 + # w + +# number=2 +37 + +# double-quoted-string=3 +"str" + +# single-quoted-string=4 +'str' + +# keyword=5 +pass + +# triple-quoted-string=6 +'''str''' + +# triple-double-quoted-string=7 +"""str""" + +# class-name=8 +class ClassName: + pass + +# function-name=9 +def function_name(): + pass + +# operator=10 +1 + 3 + +# identifier=11 +identifier = 2 + +# comment-block=12 +## block + +# unclosed-string=13 +" unclosed + +# highlighted-identifier=14 +hilight = 2 + +# decorator=15 +@staticmethod +def fn(): pass + +a = 1 +# double-quoted-f-string=16 +f"{a}" + +# single-quoted-f-string=17 +f'{a}' + +# triple-quoted-f-string=18 +f'''{a}''' + +# double-triple-quoted-f-string=19 +f"""{a}""" |