From 63196f5646e56050be7baa2c2d4185ae4502761a Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Wed, 27 May 2009 17:09:37 -0400 Subject: [PATCH] decorator support for python --HG-- branch : pmacs2 --- mode/python.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mode/python.py b/mode/python.py index 52820d5..7bb02bf 100644 --- a/mode/python.py +++ b/mode/python.py @@ -71,6 +71,7 @@ class PythonGrammar(Grammar): OverridePatternRule('comment', '#@@:(?P[.a-zA-Z0-9_]+):(?P[.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'),