QScintilla/Lexers/LexerPython.py

changeset 6881
054667c5c270
parent 6877
da5d6c7d5348
--- a/QScintilla/Lexers/LexerPython.py	Tue Mar 19 19:03:27 2019 +0100
+++ b/QScintilla/Lexers/LexerPython.py	Tue Mar 19 19:07:05 2019 +0100
@@ -100,6 +100,14 @@
                         "font_bold": True,
                     }
                 },
+                3: {
+                    "Description": self.tr("Cython Specifics"),
+                    "Words": "cython pyximport Cython __cinit__ __dealloc__",
+                    "Style": {
+                        "fore": 0xdd0000,
+                        "font_bold": True,
+                    }
+                },
             },
         }
     
@@ -227,13 +235,18 @@
                 keywords = ("and as assert break class continue def del elif "
                             "else except exec finally for from global if "
                             "import in is lambda not or pass print raise "
-                            "return try while with yield cdef cimport cpdef")
+                            "return try while with yield")
             elif self.language() == "Python3":
                 keywords = ("False None True and as assert break class "
                             "continue def del elif else except finally for "
                             "from global if import in is lambda nonlocal not "
-                            "or pass raise return try while with yield cdef "
-                            "cimport cpdef")
+                            "or pass raise return try while with yield")
+            elif self.language() == "Cython":
+                keywords = ("False None True and as assert break class "
+                            "continue def del elif else except finally for "
+                            "from global if import in is lambda nonlocal not "
+                            "or pass raise return try while with yield "
+                            "cdef cimport cpdef ctypedef")
             else:
                 keywords = QsciLexerPython.keywords(self, kwSet)
         else:

eric ide

mercurial