eric6/Utilities/ClassBrowsers/idlclbr.py

changeset 8205
4a0f1f896341
parent 7923
91e843545d9a
child 8217
385f60c94548
equal deleted inserted replaced
8204:fd477cded1c1 8205:4a0f1f896341
332 while classstack and classstack[-1][1] >= thisindent: 332 while classstack and classstack[-1][1] >= thisindent:
333 del classstack[-1] 333 del classstack[-1]
334 if classstack: 334 if classstack:
335 # it's an interface/module method 335 # it's an interface/module method
336 cur_class = classstack[-1][0] 336 cur_class = classstack[-1][0]
337 if ( 337 if isinstance(cur_class, (Interface, Module)):
338 isinstance(cur_class, Interface) or
339 isinstance(cur_class, Module)
340 ):
341 # it's a method 338 # it's a method
342 f = Function(None, meth_name, 339 f = Function(None, meth_name,
343 file, lineno, meth_sig) 340 file, lineno, meth_sig)
344 cur_class._addmethod(meth_name, f) 341 cur_class._addmethod(meth_name, f)
345 # else it's a nested def 342 # else it's a nested def
418 index = -1 415 index = -1
419 while index >= -len(classstack): 416 while index >= -len(classstack):
420 if ( 417 if (
421 classstack[index][0] is not None and 418 classstack[index][0] is not None and
422 not isinstance(classstack[index][0], Function) and 419 not isinstance(classstack[index][0], Function) and
423 not classstack[index][1] >= indent 420 classstack[index][1] < indent
424 ): 421 ):
425 attributes = m.group("AttributeNames").split(',') 422 attributes = m.group("AttributeNames").split(',')
426 ro = m.group("AttributeReadonly") 423 ro = m.group("AttributeReadonly")
427 for attribute in attributes: 424 for attribute in attributes:
428 attr = Attribute(module, attribute, file, lineno) 425 attr = Attribute(module, attribute, file, lineno)

eric ide

mercurial