382 if cur_obj and isinstance(cur_obj, Function): |
382 if cur_obj and isinstance(cur_obj, Function): |
383 cur_obj.setEndLine(lineno - 1) |
383 cur_obj.setEndLine(lineno - 1) |
384 cur_obj = f |
384 cur_obj = f |
385 classstack.append((f, thisindent)) # Marker for nested fns |
385 classstack.append((f, thisindent)) # Marker for nested fns |
386 |
386 |
387 elif m.start("String") >= 0: |
387 elif ( |
388 pass |
388 m.start("String") >= 0 or |
389 |
389 m.start("Comment") >= 0 or |
390 elif m.start("Comment") >= 0: |
390 m.start("ClassIgnored") >= 0 or |
391 pass |
391 m.start("BeginEnd") >= 0 |
392 |
392 ): |
393 elif m.start("ClassIgnored") >= 0: |
|
394 pass |
393 pass |
395 |
394 |
396 elif m.start("Class") >= 0: |
395 elif m.start("Class") >= 0: |
397 # we found a class definition |
396 # we found a class definition |
398 thisindent = indent |
397 thisindent = indent |
600 # it's a class/module method |
599 # it's a class/module method |
601 indent = classstack[-1][1] |
600 indent = classstack[-1][1] |
602 else: |
601 else: |
603 indent = 0 |
602 indent = 0 |
604 |
603 |
605 elif m.start("BeginEnd") >= 0: |
|
606 pass |
|
607 |
|
608 elif m.start("CodingLine") >= 0: |
604 elif m.start("CodingLine") >= 0: |
609 # a coding statement |
605 # a coding statement |
610 coding = m.group("Coding") |
606 coding = m.group("Coding") |
611 lineno += src.count('\n', last_lineno_pos, start) |
607 lineno += src.count('\n', last_lineno_pos, start) |
612 last_lineno_pos = start |
608 last_lineno_pos = start |