324 meth_name = m.group("MethodName") |
324 meth_name = m.group("MethodName") |
325 meth_sig = m.group("MethodSignature") |
325 meth_sig = m.group("MethodSignature") |
326 meth_sig = meth_sig and meth_sig.replace('\\\n', '') or '' |
326 meth_sig = meth_sig and meth_sig.replace('\\\n', '') or '' |
327 meth_sig = _commentsub('', meth_sig) |
327 meth_sig = _commentsub('', meth_sig) |
328 meth_sig = _normalize(' ', meth_sig) |
328 meth_sig = _normalize(' ', meth_sig) |
329 lineno = lineno + src.count('\n', last_lineno_pos, start) |
329 lineno += src.count('\n', last_lineno_pos, start) |
330 last_lineno_pos = start |
330 last_lineno_pos = start |
331 # close all interfaces/modules indented at least as much |
331 # close all interfaces/modules indented at least as much |
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: |
369 thisindent = indent |
369 thisindent = indent |
370 indent += 1 |
370 indent += 1 |
371 # close all interfaces/modules indented at least as much |
371 # close all interfaces/modules indented at least as much |
372 while classstack and classstack[-1][1] >= thisindent: |
372 while classstack and classstack[-1][1] >= thisindent: |
373 del classstack[-1] |
373 del classstack[-1] |
374 lineno = lineno + src.count('\n', last_lineno_pos, start) |
374 lineno += src.count('\n', last_lineno_pos, start) |
375 last_lineno_pos = start |
375 last_lineno_pos = start |
376 class_name = m.group("InterfaceName") |
376 class_name = m.group("InterfaceName") |
377 inherit = m.group("InterfaceSupers") |
377 inherit = m.group("InterfaceSupers") |
378 if inherit: |
378 if inherit: |
379 # the interface inherits from other interfaces |
379 # the interface inherits from other interfaces |
396 thisindent = indent |
396 thisindent = indent |
397 indent += 1 |
397 indent += 1 |
398 # close all interfaces/modules indented at least as much |
398 # close all interfaces/modules indented at least as much |
399 while classstack and classstack[-1][1] >= thisindent: |
399 while classstack and classstack[-1][1] >= thisindent: |
400 del classstack[-1] |
400 del classstack[-1] |
401 lineno = lineno + src.count('\n', last_lineno_pos, start) |
401 lineno += src.count('\n', last_lineno_pos, start) |
402 last_lineno_pos = start |
402 last_lineno_pos = start |
403 module_name = m.group("ModuleName") |
403 module_name = m.group("ModuleName") |
404 # remember this module |
404 # remember this module |
405 cur_class = Module(module, module_name, file, lineno) |
405 cur_class = Module(module, module_name, file, lineno) |
406 endline = calculateEndline(lineno, srcLines) |
406 endline = calculateEndline(lineno, srcLines) |
408 if not classstack: |
408 if not classstack: |
409 dictionary[module_name] = cur_class |
409 dictionary[module_name] = cur_class |
410 classstack.append((cur_class, thisindent)) |
410 classstack.append((cur_class, thisindent)) |
411 |
411 |
412 elif m.start("Attribute") >= 0: |
412 elif m.start("Attribute") >= 0: |
413 lineno = lineno + src.count('\n', last_lineno_pos, start) |
413 lineno += src.count('\n', last_lineno_pos, start) |
414 last_lineno_pos = start |
414 last_lineno_pos = start |
415 index = -1 |
415 index = -1 |
416 while index >= -len(classstack): |
416 while index >= -len(classstack): |
417 if ( |
417 if ( |
418 classstack[index][0] is not None and |
418 classstack[index][0] is not None and |