650 contents = _hashsub(r"\1", contents) |
650 contents = _hashsub(r"\1", contents) |
651 else: |
651 else: |
652 if self.file.lower().endswith('.ptl'): |
652 if self.file.lower().endswith('.ptl'): |
653 contents = "" |
653 contents = "" |
654 else: |
654 else: |
655 contents = 1 and m.group("DocstringContents1") \ |
655 contents = m.group("DocstringContents1") \ |
656 or m.group("DocstringContents2") |
656 or m.group("DocstringContents2") |
657 if cur_obj: |
657 if cur_obj: |
658 cur_obj.addDescription(contents) |
658 cur_obj.addDescription(contents) |
659 |
659 |
660 elif m.start("String") >= 0: |
660 elif m.start("String") >= 0: |
667 contents = _hashsub(r"\1", contents) |
667 contents = _hashsub(r"\1", contents) |
668 else: |
668 else: |
669 if self.file.lower().endswith('.ptl'): |
669 if self.file.lower().endswith('.ptl'): |
670 contents = "" |
670 contents = "" |
671 else: |
671 else: |
672 contents = 1 and m.group("StringContents1") \ |
672 contents = m.group("StringContents1") \ |
673 or m.group("StringContents2") |
673 or m.group("StringContents2") |
674 if cur_obj: |
674 if cur_obj: |
675 cur_obj.addDescription(contents) |
675 cur_obj.addDescription(contents) |
676 |
676 |
677 elif m.start("Class") >= 0: |
677 elif m.start("Class") >= 0: |
816 del deltastack[-1] |
816 del deltastack[-1] |
817 conditionalsstack.append(thisindent) |
817 conditionalsstack.append(thisindent) |
818 deltaindentcalculated = 0 |
818 deltaindentcalculated = 0 |
819 |
819 |
820 elif m.start("Comment") >= 0: |
820 elif m.start("Comment") >= 0: |
821 pass |
821 if modulelevel: |
|
822 continue |
822 |
823 |
823 else: |
824 else: |
824 assert 0, "regexp _getnext found something unexpected" |
825 assert 0, "regexp _getnext found something unexpected" |
825 |
826 |
826 modulelevel = 0 |
827 modulelevel = False |
827 |
828 |
828 def __rb_scan(self, src): |
829 def __rb_scan(self, src): |
829 """ |
830 """ |
830 Private method to scan the source text of a Python module and retrieve |
831 Private method to scan the source text of a Python module and retrieve |
831 the relevant information. |
832 the relevant information. |