Highlight 'yield from' statement

The 'yield from' statement was introduced in Python 3.3. Reported by
Elizabeth Myers.
This commit is contained in:
Dmitry Vasiliev
2013-11-18 21:29:47 +01:00
parent efe8499cfb
commit 453269d0f8
4 changed files with 18 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
Revision 3.3.6 (2013-11-18):
- Highlight 'yield from' statement introduced in Python 3.3. Reported by
Elizabeth Myers.
Revision 3.3.5 (2013-08-31):
- Highlight 'import', 'from' and 'as' as include statements.

View File

@@ -133,6 +133,7 @@ List of the contributors in alphabetical order:
- Andrea Riciputi
- Anton Butanaev
- Caleb Adamantine
- Elizabeth Myers
- Jeroen Ruigrok van der Werven
- John Eikenberry
- Marc Weber

View File

@@ -2,9 +2,9 @@
" Language: Python
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
" URL: https://github.com/hdima/python-syntax
" Last Change: 2013-08-31
" Last Change: 2013-11-18
" Filenames: *.py
" Version: 3.3.5
" Version: 3.3.6
"
" Based on python.vim (from Vim 6.1 distribution)
" by Neil Schemenauer <nas at python dot ca>
@@ -25,6 +25,7 @@
" Andrea Riciputi
" Anton Butanaev
" Caleb Adamantine
" Elizabeth Myers
" Jeroen Ruigrok van der Werven
" John Eikenberry
" Marc Weber
@@ -148,15 +149,18 @@ syn keyword pythonStatement break continue del
syn keyword pythonStatement exec return
syn keyword pythonStatement pass raise
syn keyword pythonStatement global assert
syn keyword pythonStatement lambda yield
syn keyword pythonStatement lambda
syn keyword pythonStatement with
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
syn keyword pythonRepeat for while
syn keyword pythonConditional if elif else
syn keyword pythonImport import from
syn keyword pythonImport import
syn keyword pythonException try except finally
syn keyword pythonOperator and in is not or
syn match pythonStatement "\<yield\>" display
syn match pythonImport "\<from\>" display
if s:Python2Syntax()
if !s:Enabled("g:python_print_as_function")
syn keyword pythonStatement print
@@ -165,6 +169,7 @@ if s:Python2Syntax()
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
else
syn keyword pythonStatement as nonlocal None
syn match pythonStatement "\<yield\s\+from\>" display
syn keyword pythonBoolean True False
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
endif

View File

@@ -10,6 +10,9 @@
with break continue del exec return pass print raise global assert lambda yield
for while if elif else import from as try except finally and in is not or
yield from
def functionname
class Classname
def функция