644 contents = m.group("DocstringContents3") |
648 contents = m.group("DocstringContents3") |
645 if contents is not None: |
649 if contents is not None: |
646 contents = _hashsub(r"\1", contents) |
650 contents = _hashsub(r"\1", contents) |
647 else: |
651 else: |
648 if self.file.lower().endswith('.ptl'): |
652 if self.file.lower().endswith('.ptl'): |
649 contents = "" |
653 contents = "" |
650 else: |
654 else: |
651 contents = 1 and m.group("DocstringContents1") \ |
655 contents = m.group("DocstringContents1") \ |
652 or m.group("DocstringContents2") |
656 or m.group("DocstringContents2") |
653 if cur_obj: |
657 if cur_obj: |
654 cur_obj.addDescription(contents) |
658 cur_obj.addDescription(contents) |
655 |
659 |
656 elif m.start("String") >= 0: |
660 elif m.start("String") >= 0: |
663 contents = _hashsub(r"\1", contents) |
667 contents = _hashsub(r"\1", contents) |
664 else: |
668 else: |
665 if self.file.lower().endswith('.ptl'): |
669 if self.file.lower().endswith('.ptl'): |
666 contents = "" |
670 contents = "" |
667 else: |
671 else: |
668 contents = 1 and m.group("StringContents1") \ |
672 contents = m.group("StringContents1") \ |
669 or m.group("StringContents2") |
673 or m.group("StringContents2") |
670 if cur_obj: |
674 if cur_obj: |
671 cur_obj.addDescription(contents) |
675 cur_obj.addDescription(contents) |
672 |
676 |
673 elif m.start("Class") >= 0: |
677 elif m.start("Class") >= 0: |
811 if deltastack: |
815 if deltastack: |
812 del deltastack[-1] |
816 del deltastack[-1] |
813 conditionalsstack.append(thisindent) |
817 conditionalsstack.append(thisindent) |
814 deltaindentcalculated = 0 |
818 deltaindentcalculated = 0 |
815 |
819 |
|
820 elif m.start("Comment") >= 0: |
|
821 if modulelevel: |
|
822 continue |
|
823 |
816 else: |
824 else: |
817 assert 0, "regexp _getnext found something unexpected" |
825 assert 0, "regexp _getnext found something unexpected" |
818 |
826 |
819 modulelevel = 0 |
827 modulelevel = False |
820 |
828 |
821 def __rb_scan(self, src): |
829 def __rb_scan(self, src): |
822 """ |
830 """ |
823 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 |
824 the relevant information. |
832 the relevant information. |