1
0
mirror of https://github.com/gryf/python-syntax.git synced 2025-12-19 20:38:07 +01:00

4 Commits

Author SHA1 Message Date
Dmitry Vasiliev
878e75cf90 Highlight non-ASCII decorators only for Python 3 2014-12-27 16:13:08 +01:00
Dmitry Vasiliev
9209dd0c02 Merge https://github.com/mcsalgado/python-syntax 2014-12-27 15:52:20 +01:00
Dmitry Vasiliev
ea215a9085 Add the MIT license 2014-12-27 15:43:12 +01:00
Victor Salgado
9dc6765ad1 Fix decorators to allow the same kind of characters that functions do 2014-12-19 06:47:25 -02:00
5 changed files with 37 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
Revision 3.3.7 (2014-12-27):
- Add support for Python 3 non-ASCII decorator names.
Patch by Victor Salgado
Revision 3.3.6 (2013-11-18): Revision 3.3.6 (2013-11-18):
- Highlight 'yield from' statement introduced in Python 3.3. Reported by - Highlight 'yield from' statement introduced in Python 3.3. Reported by

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2002-2014 Dmitry Vasiliev <dima@hlabs.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -139,5 +139,6 @@ List of the contributors in alphabetical order:
- Marc Weber - Marc Weber
- Pedro Algarvio - Pedro Algarvio
- pydave at GitHub - pydave at GitHub
- Victor Salgado
- Will Gray - Will Gray
- Yuri Habrusiev - Yuri Habrusiev

View File

@@ -2,9 +2,9 @@
" Language: Python " Language: Python
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org> " Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
" URL: https://github.com/hdima/python-syntax " URL: https://github.com/hdima/python-syntax
" Last Change: 2013-11-18 " Last Change: 2014-12-27
" Filenames: *.py " Filenames: *.py
" Version: 3.3.6 " Version: 3.3.7
" "
" Based on python.vim (from Vim 6.1 distribution) " Based on python.vim (from Vim 6.1 distribution)
" by Neil Schemenauer <nas at python dot ca> " by Neil Schemenauer <nas at python dot ca>
@@ -31,6 +31,7 @@
" Marc Weber " Marc Weber
" Pedro Algarvio " Pedro Algarvio
" pydave at GitHub " pydave at GitHub
" Victor Salgado
" Will Gray " Will Gray
" Yuri Habrusiev " Yuri Habrusiev
" "
@@ -179,7 +180,11 @@ endif
" "
syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite
if s:Python2Syntax()
syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
else
syn match pythonDottedName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*" display contained
endif
syn match pythonDot "\." display containedin=pythonDottedName syn match pythonDot "\." display containedin=pythonDottedName
" "

View File

@@ -51,6 +51,8 @@ RuntimeWarning FutureWarning ImportWarning UnicodeWarning
@ decoratorname @ decoratorname
@ object.__init__(arg1, arg2) @ object.__init__(arg1, arg2)
@ декоратор
@ декоратор.décorateur
# Numbers # Numbers