src/eric7/QScintilla/Lexers/Lexer.py

branch
eric7
changeset 9293
7d9d916a9a9f
parent 9221
bf71ee032bb4
child 9295
d14096c04126
equal deleted inserted replaced
9292:a5c8a0213fe3 9293:7d9d916a9a9f
42 42
43 def commentStr(self): 43 def commentStr(self):
44 """ 44 """
45 Public method to return the comment string. 45 Public method to return the comment string.
46 46
47 @return comment string (string) 47 @return comment string
48 @type str
48 """ 49 """
49 return self.commentString 50 return self.commentString
50 51
51 def canBlockComment(self): 52 def canBlockComment(self):
52 """ 53 """
53 Public method to determine, whether the lexer language supports a 54 Public method to determine, whether the lexer language supports a
54 block comment. 55 block comment.
55 56
56 @return flag (boolean) 57 @return flag indicating block comment is available
58 @rtype bool
57 """ 59 """
58 return self.commentString != "" 60 return self.commentString != ""
59 61
60 def streamCommentStr(self): 62 def streamCommentStr(self):
61 """ 63 """
62 Public method to return the stream comment strings. 64 Public method to return the stream comment strings.
63 65
64 @return stream comment strings (dictionary with two strings) 66 @return dictionary containing the start and end stream comment strings
67 @type dict of {"start": str, "end": str}
65 """ 68 """
66 return self.streamCommentString 69 return self.streamCommentString
67 70
68 def canStreamComment(self): 71 def canStreamComment(self):
69 """ 72 """
70 Public method to determine, whether the lexer language supports a 73 Public method to determine, whether the lexer language supports a
71 stream comment. 74 stream comment.
72 75
73 @return flag (boolean) 76 @return flag indicating stream comment is available
77 @type bool
74 """ 78 """
75 return ( 79 return (
76 self.streamCommentString["start"] != "" 80 self.streamCommentString["start"] != ""
77 and self.streamCommentString["end"] != "" 81 and self.streamCommentString["end"] != ""
78 ) 82 )
79 83
80 def boxCommentStr(self): 84 def boxCommentStr(self):
81 """ 85 """
82 Public method to return the box comment strings. 86 Public method to return the box comment strings.
83 87
84 @return box comment strings (dictionary with three QStrings) 88 @return dictionary containing the start, middle and end box comment strings
89 @type dict of {"start": str, "middle": str, "end": str}
85 """ 90 """
86 return self.boxCommentString 91 return self.boxCommentString
87 92
88 def canBoxComment(self): 93 def canBoxComment(self):
89 """ 94 """
90 Public method to determine, whether the lexer language supports a 95 Public method to determine, whether the lexer language supports a
91 box comment. 96 box comment.
92 97
93 @return flag (boolean) 98 @return flag box comment is available
99 @type bool
94 """ 100 """
95 return ( 101 return (
96 (self.boxCommentString["start"] != "") 102 (self.boxCommentString["start"] != "")
97 and (self.boxCommentString["middle"] != "") 103 and (self.boxCommentString["middle"] != "")
98 and (self.boxCommentString["end"] != "") 104 and (self.boxCommentString["end"] != "")

eric ide

mercurial