src/eric7/QScintilla/Lexers/LexerCoffeeScript.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
22 def __init__(self, parent=None): 22 def __init__(self, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param parent parent widget of this lexer 26 @param parent parent widget of this lexer
27 @type QWidget
27 """ 28 """
28 QsciLexerCoffeeScript.__init__(self, parent) 29 QsciLexerCoffeeScript.__init__(self, parent)
29 Lexer.__init__(self) 30 Lexer.__init__(self)
30 31
31 self.commentString = "#" 32 self.commentString = "#"
51 52
52 def isCommentStyle(self, style): 53 def isCommentStyle(self, style):
53 """ 54 """
54 Public method to check, if a style is a comment style. 55 Public method to check, if a style is a comment style.
55 56
56 @param style style to check (integer) 57 @param style style to check
57 @return flag indicating a comment style (boolean) 58 @type int
59 @return flag indicating a comment style
60 @rtype bool
58 """ 61 """
59 return style in [ 62 return style in [
60 QsciLexerCoffeeScript.Comment, 63 QsciLexerCoffeeScript.Comment,
61 QsciLexerCoffeeScript.CommentDoc, 64 QsciLexerCoffeeScript.CommentDoc,
62 QsciLexerCoffeeScript.CommentLine, 65 QsciLexerCoffeeScript.CommentLine,
67 70
68 def isStringStyle(self, style): 71 def isStringStyle(self, style):
69 """ 72 """
70 Public method to check, if a style is a string style. 73 Public method to check, if a style is a string style.
71 74
72 @param style style to check (integer) 75 @param style style to check
73 @return flag indicating a string style (boolean) 76 @type int
77 @return flag indicating a string style
78 @rtype bool
74 """ 79 """
75 return style in [ 80 return style in [
76 QsciLexerCoffeeScript.DoubleQuotedString, 81 QsciLexerCoffeeScript.DoubleQuotedString,
77 QsciLexerCoffeeScript.SingleQuotedString, 82 QsciLexerCoffeeScript.SingleQuotedString,
78 QsciLexerCoffeeScript.UnclosedString, 83 QsciLexerCoffeeScript.UnclosedString,
81 86
82 def defaultKeywords(self, kwSet): 87 def defaultKeywords(self, kwSet):
83 """ 88 """
84 Public method to get the default keywords. 89 Public method to get the default keywords.
85 90
86 @param kwSet number of the keyword set (integer) 91 @param kwSet number of the keyword set
87 @return string giving the keywords (string) or None 92 @type int
93 @return string giving the keywords or None
94 @rtype str
88 """ 95 """
89 return QsciLexerCoffeeScript.keywords(self, kwSet) 96 return QsciLexerCoffeeScript.keywords(self, kwSet)
90 97
91 def maximumKeywordSet(self): 98 def maximumKeywordSet(self):
92 """ 99 """
93 Public method to get the maximum keyword set. 100 Public method to get the maximum keyword set.
94 101
95 @return maximum keyword set (integer) 102 @return maximum keyword set
103 @rtype int
96 """ 104 """
97 return 4 105 return 4
98 106
99 107
100 def createLexer(variant="", parent=None): # noqa: U100 108 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial