decorator support for python

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-05-27 17:09:37 -04:00
parent 540b1d75c4
commit 63196f5646
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class PythonGrammar(Grammar):
OverridePatternRule('comment', '#@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *$'),
PatternRule('comment', '#.*$'),
PatternRule('continuation', r'\\\n$'),
PatternRule('decorator', '@[a-zA-Z_][a-zA-Z0-9_]*'),
PatternRule('spaces', ' +'),
PatternRule('eol', r'\n$'),
]
@ -559,6 +560,7 @@ class Python(mode.Fundamental):
colors = {
'python.def': ('blue', 'default', 'bold'),
'python.class': ('yellow', 'default', 'bold'),
'python.decorator': ('magenta', 'default'),
'python.reserved': ('magenta', 'default', 'bold'),
'python.keyword': ('cyan', 'default', 'bold'),
'python.builtin': ('cyan', 'default', 'bold'),