summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2016-01-16 12:03:54 +0100
committerGeorg Brandl <georg@python.org>2016-01-16 12:03:54 +0100
commitbc2ed425ce8ce63d1364c0b53a9b8d6686a9109c (patch)
treeea2d925280d31bb23d13dc975fd063a16bcb27de /pygments
parent2a5779a5b44337b8d49cb057fee8945d723589de (diff)
downloadpygments-bc2ed425ce8ce63d1364c0b53a9b8d6686a9109c.tar.gz
Some Cython fixes. (refs #1193)
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/python.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index dee8e6c7..c05c8ae0 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -515,6 +515,8 @@ class CythonLexer(RegexLexer):
include('keywords'),
(r'(def|property)(\s+)', bygroups(Keyword, Text), 'funcname'),
(r'(cp?def)(\s+)', bygroups(Keyword, Text), 'cdef'),
+ # (should actually start a block with only cdefs)
+ (r'(cdef)(:)', bygroups(Keyword, Punctuation)),
(r'(class|struct)(\s+)', bygroups(Keyword, Text), 'classname'),
(r'(from)(\s+)', bygroups(Keyword, Text), 'fromimport'),
(r'(c?import)(\s+)', bygroups(Keyword, Text), 'import'),
@@ -534,7 +536,7 @@ class CythonLexer(RegexLexer):
'keywords': [
(words((
'assert', 'break', 'by', 'continue', 'ctypedef', 'del', 'elif',
- 'else', 'except', 'except?', 'exec', 'finally', 'for', 'gil',
+ 'else', 'except', 'except?', 'exec', 'finally', 'for', 'fused', 'gil',
'global', 'if', 'include', 'lambda', 'nogil', 'pass', 'print',
'raise', 'return', 'try', 'while', 'yield', 'as', 'with'), suffix=r'\b'),
Keyword),