eric6/Utilities/ClassBrowsers/protoclbr.py

changeset 7706
0c6d32ec64f1
parent 7699
d338c533f5f0
child 7781
607a6098cb44
equal deleted inserted replaced
7705:90a9aefd4253 7706:0c6d32ec64f1
255 @rtype int 255 @rtype int
256 """ 256 """
257 # convert lineno to be zero based 257 # convert lineno to be zero based
258 lineno -= 1 258 lineno -= 1
259 # 1. search for opening brace '{' 259 # 1. search for opening brace '{'
260 while lineno < len(lines) and not "{" in lines[lineno]: 260 while lineno < len(lines) and "{" not in lines[lineno]:
261 lineno += 1 261 lineno += 1
262 depth = lines[lineno].count("{") - lines[lineno].count("}") 262 depth = lines[lineno].count("{") - lines[lineno].count("}")
263 # 2. search for ending line, i.e. matching closing brace '}' 263 # 2. search for ending line, i.e. matching closing brace '}'
264 while depth > 0 and lineno < len(lines) - 1: 264 while depth > 0 and lineno < len(lines) - 1:
265 lineno += 1 265 lineno += 1

eric ide

mercurial