From 7ecb80f0fccfdf90038490b297c11bff6f7556c0 Mon Sep 17 00:00:00 2001 From: Caleb Donovick Date: Tue, 18 Dec 2018 15:37:19 -0800 Subject: [PATCH] Add `pythonNone` to `pythonExpression` Closes #54 --- syntax/python.vim | 2 +- tests/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/python.vim b/syntax/python.vim index 7761ec9..3f4c967 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -92,7 +92,7 @@ else syn match pythonStatement '\' nextgroup=pythonFunction skipwhite syn match pythonStatement '\' syn match pythonStatement '\' - syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonBuiltinObj,pythonBuiltinFunc + syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonBuiltinObj,pythonBuiltinFunc endif diff --git a/tests/test.py b/tests/test.py index 08d5a69..6f00b26 100644 --- a/tests/test.py +++ b/tests/test.py @@ -233,7 +233,7 @@ b"{0.name!r:b} {0[n]} {name!s: } {{test}} {{}} {} {.__len__:s}" b"${test} ${test ${test}aname $$$ $test+nope" f"{var}...{arr[123]} normal {var['{'] // 0xff} \"xzcb\" 'xzcb' {var['}'] + 1} text" -f"{expr1 if True or False else expr2} wow {','.join(c.lower() for c in 'asdf')}" +f"{expr1 if True or False else expr2} {None} wow {','.join(c.lower() for c in 'asdf')}" f"hello {expr:.2f} yes {(lambda: 0b1)():#03x} lol {var!r}" f'brackets: {{ 1 + 2 }} and {{{{ 3 + 4 }}}}' fr'this {that}'