QScintilla/Lexers/__init__.py

changeset 6058
9432e23f663f
parent 6048
82ad8ec9548c
child 6238
e3ec560a2a5c
--- a/QScintilla/Lexers/__init__.py	Mon Jan 01 19:30:23 2018 +0100
+++ b/QScintilla/Lexers/__init__.py	Sat Jan 06 18:59:24 2018 +0100
@@ -96,6 +96,8 @@
                   "lexerCMake.png"],
         "CSS": [QCoreApplication.translate('Lexers', "CSS"), 'dummy.css',
                 "lexerCSS.png"],
+        "Cython": [QCoreApplication.translate('Lexers', "Cython"), 'dummy.pyx',
+                   "lexerCython.png"],
         "D": [QCoreApplication.translate('Lexers', "D"), 'dummy.d',
               "lexerD.png"],
         "Diff": [QCoreApplication.translate('Lexers', "Diff"), 'dummy.diff',
@@ -339,6 +341,8 @@
             
             elif language == "Protocol":
                 return __getPygmentsLexer(parent, name="Protocol Buffer")
+            elif language == "Cython":
+                return __getPygmentsLexer(parent, name="Cython")
             
             elif language in LexerRegistry:
                 return LexerRegistry[language][2](parent)
@@ -389,7 +393,7 @@
             'Python GUI Files (*.pyw *.pyw2 *.pyw3)'),
         QCoreApplication.translate(
             'Lexers',
-            'Pyrex Files (*.pyx)'),
+            'Cython Files (*.pyx *.pxd *.pxi)'),
         QCoreApplication.translate(
             'Lexers',
             'Quixote Template Files (*.ptl)'),
@@ -576,7 +580,13 @@
             "Python3 GUI Files (*.pyw)"),
         QCoreApplication.translate(
             'Lexers',
-            "Pyrex Files (*.pyx)"),
+            "Cython Files (*.pyx)"),
+        QCoreApplication.translate(
+            'Lexers',
+            "Cython Declaration Files (*.pxd)"),
+        QCoreApplication.translate(
+            'Lexers',
+            "Cython Include Files (*.pxi)"),
         QCoreApplication.translate(
             'Lexers',
             "Quixote Template Files (*.ptl)"),
@@ -833,7 +843,9 @@
         '*.pyw2': "Python",
         '*.py3': "Python",
         '*.pyw3': "Python",
-        '*.pyx': "Python",
+        '*.pyx': "Cython",
+        '*.pxd': "Cython",
+        '*.pxi': "Cython",
         '*.ptl': "Python",
         '*.rb': "Ruby",
         '*.rbw': "Ruby",

eric ide

mercurial