QScintilla/Lexers/LexerPython.py

changeset 6881
054667c5c270
parent 6877
da5d6c7d5348
equal deleted inserted replaced
6880:51f8a56f0b42 6881:054667c5c270
98 "Style": { 98 "Style": {
99 "fore": 0x44AADD, 99 "fore": 0x44AADD,
100 "font_bold": True, 100 "font_bold": True,
101 } 101 }
102 }, 102 },
103 3: {
104 "Description": self.tr("Cython Specifics"),
105 "Words": "cython pyximport Cython __cinit__ __dealloc__",
106 "Style": {
107 "fore": 0xdd0000,
108 "font_bold": True,
109 }
110 },
103 }, 111 },
104 } 112 }
105 113
106 def language(self): 114 def language(self):
107 """ 115 """
225 if kwSet == 1: 233 if kwSet == 1:
226 if self.language() in ["Python", "Python2"]: 234 if self.language() in ["Python", "Python2"]:
227 keywords = ("and as assert break class continue def del elif " 235 keywords = ("and as assert break class continue def del elif "
228 "else except exec finally for from global if " 236 "else except exec finally for from global if "
229 "import in is lambda not or pass print raise " 237 "import in is lambda not or pass print raise "
230 "return try while with yield cdef cimport cpdef") 238 "return try while with yield")
231 elif self.language() == "Python3": 239 elif self.language() == "Python3":
232 keywords = ("False None True and as assert break class " 240 keywords = ("False None True and as assert break class "
233 "continue def del elif else except finally for " 241 "continue def del elif else except finally for "
234 "from global if import in is lambda nonlocal not " 242 "from global if import in is lambda nonlocal not "
235 "or pass raise return try while with yield cdef " 243 "or pass raise return try while with yield")
236 "cimport cpdef") 244 elif self.language() == "Cython":
245 keywords = ("False None True and as assert break class "
246 "continue def del elif else except finally for "
247 "from global if import in is lambda nonlocal not "
248 "or pass raise return try while with yield "
249 "cdef cimport cpdef ctypedef")
237 else: 250 else:
238 keywords = QsciLexerPython.keywords(self, kwSet) 251 keywords = QsciLexerPython.keywords(self, kwSet)
239 else: 252 else:
240 keywords = QsciLexerPython.keywords(self, kwSet) 253 keywords = QsciLexerPython.keywords(self, kwSet)
241 254

eric ide

mercurial