Sat, 20 Apr 2024 18:01:36 +0200
Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
10439
21c28b0f9e41
Updated copyright for 2024.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10431
diff
changeset
|
3 | # Copyright (c) 2014 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing a CoffeeScript lexer with some additional methods. |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
10 | from PyQt6.Qsci import QsciLexerCoffeeScript |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | |
9473
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
12 | from eric7 import Preferences |
3f23dbf37dbe
Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9413
diff
changeset
|
13 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | from .Lexer import Lexer |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | |
3654
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
17 | class LexerCoffeeScript(Lexer, QsciLexerCoffeeScript): |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | Subclass to implement some additional lexer dependant methods. |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
21 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | def __init__(self, parent=None): |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | Constructor |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
25 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | @param parent parent widget of this lexer |
10431
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
27 | @type QWidget |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | """ |
3654
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
29 | QsciLexerCoffeeScript.__init__(self, parent) |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | Lexer.__init__(self) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
31 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | self.commentString = "#" |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
33 | self.streamCommentString = {"start": "###\n", "end": "\n###"} |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
34 | |
6874
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
35 | self.keywordSetDescriptions = [ |
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
36 | self.tr("Keywords"), |
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
37 | self.tr("Secondary keywords"), |
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
38 | self.tr("Unused"), |
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
39 | self.tr("Global classes"), |
5a3a39442711
Lexers: extended the keyword set handling by introducing a keyword set description and some set adjustments (harmonized with SciTE).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6645
diff
changeset
|
40 | ] |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
41 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | def initProperties(self): |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | Public slot to initialize the properties. |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
46 | self.setDollarsAllowed(Preferences.getEditor("CoffeeScriptDollarsAllowed")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
47 | self.setFoldComments(Preferences.getEditor("CoffeScriptFoldComment")) |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | self.setStylePreprocessor( |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
49 | Preferences.getEditor("CoffeeScriptStylePreprocessor") |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
50 | ) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
51 | self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
52 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | def isCommentStyle(self, style): |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | Public method to check, if a style is a comment style. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
56 | |
10431
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
57 | @param style style to check |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
58 | @type int |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
59 | @return flag indicating a comment style |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
60 | @rtype bool |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
61 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
62 | return style in [ |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
63 | QsciLexerCoffeeScript.Comment, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
64 | QsciLexerCoffeeScript.CommentDoc, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
65 | QsciLexerCoffeeScript.CommentLine, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
66 | QsciLexerCoffeeScript.CommentLineDoc, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
67 | QsciLexerCoffeeScript.CommentBlock, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
68 | QsciLexerCoffeeScript.BlockRegexComment, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
69 | ] |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
70 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | def isStringStyle(self, style): |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | Public method to check, if a style is a string style. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
74 | |
10431
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
75 | @param style style to check |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
76 | @type int |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
77 | @return flag indicating a string style |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
78 | @rtype bool |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
80 | return style in [ |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
81 | QsciLexerCoffeeScript.DoubleQuotedString, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
82 | QsciLexerCoffeeScript.SingleQuotedString, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
83 | QsciLexerCoffeeScript.UnclosedString, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
84 | QsciLexerCoffeeScript.VerbatimString, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
85 | ] |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
86 | |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | def defaultKeywords(self, kwSet): |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
88 | """ |
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
89 | Public method to get the default keywords. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
90 | |
10431
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
91 | @param kwSet number of the keyword set |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
92 | @type int |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
93 | @return string giving the keywords or None |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
94 | @rtype str |
3647
fef91a1eb27b
Added support for the QScintilla CoffeeScript lexer (QsciLexerCoffeeScript) as of QScintilla 2.8.3.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
95 | """ |
3654
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
96 | return QsciLexerCoffeeScript.keywords(self, kwSet) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
97 | |
3654
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
98 | def maximumKeywordSet(self): |
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
99 | """ |
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
100 | Public method to get the maximum keyword set. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
101 | |
10431
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
102 | @return maximum keyword set |
64157aeb0312
Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10069
diff
changeset
|
103 | @rtype int |
3654
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
104 | """ |
ffeb85cdc72d
Fixed and improved the CoffeeScript interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3647
diff
changeset
|
105 | return 4 |
9484
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
106 | |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
107 | |
10069
435cc5875135
Corrected and checked some code style issues (unused function arguments).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9653
diff
changeset
|
108 | def createLexer(variant="", parent=None): # noqa: U100 |
9484
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
109 | """ |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
110 | Function to instantiate a lexer object. |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
111 | |
10683
779cda568acb
Changed the source code and the source code documentation to improve the indication of unused method/function arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
10439
diff
changeset
|
112 | @param variant name of the language variant (unused) |
9484
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
113 | @type str |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
114 | @param parent parent widget of this lexer |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
115 | @type QObject |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
116 | @return instantiated lexer object |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
117 | @rtype LexerCoffeeScript |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
118 | """ |
d2eb8f0a5bf0
Changed the way editor lexers are instantiated.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9473
diff
changeset
|
119 | return LexerCoffeeScript(parent=parent) |