189 (?P<ConditionalDefineIndent> [ \t]* ) |
190 (?P<ConditionalDefineIndent> [ \t]* ) |
190 (?: (?: if | elif ) [ \t]+ [^:]* | else [ \t]* ) : (?= \s* def) |
191 (?: (?: if | elif ) [ \t]+ [^:]* | else [ \t]* ) : (?= \s* def) |
191 ) |
192 ) |
192 """, re.VERBOSE | re.DOTALL | re.MULTILINE).search |
193 """, re.VERBOSE | re.DOTALL | re.MULTILINE).search |
193 |
194 |
194 _rb_getnext = re.compile(r""" |
195 _rb_getnext = re.compile( |
|
196 r""" |
195 (?P<Docstring> |
197 (?P<Docstring> |
196 =begin [ \t]+ edoc (?P<DocstringContents> .*? ) =end |
198 =begin [ \t]+ edoc (?P<DocstringContents> .*? ) =end |
197 ) |
199 ) |
198 |
200 |
199 | (?P<String> |
201 | (?P<String> |
959 classstack[-1][0].setEndLine(lineno - 1) |
961 classstack[-1][0].setEndLine(lineno - 1) |
960 del classstack[-1] |
962 del classstack[-1] |
961 module_name = m.group("ModuleName") |
963 module_name = m.group("ModuleName") |
962 # remember this class |
964 # remember this class |
963 cur_class = RbModule(self.name, module_name, |
965 cur_class = RbModule(self.name, module_name, |
964 self.file, lineno) |
966 self.file, lineno) |
965 # add nested Ruby modules to the file |
967 # add nested Ruby modules to the file |
966 if module_name in self.modules: |
968 if module_name in self.modules: |
967 cur_class = self.modules[module_name] |
969 cur_class = self.modules[module_name] |
968 else: |
970 else: |
969 self.addModule(module_name, cur_class) |
971 self.addModule(module_name, cur_class) |
1152 exhausted = path + [cls] |
1154 exhausted = path + [cls] |
1153 exhausted.reverse() |
1155 exhausted.reverse() |
1154 self.addPathToHierarchy( |
1156 self.addPathToHierarchy( |
1155 exhausted, result, self.addPathToHierarchy) |
1157 exhausted, result, self.addPathToHierarchy) |
1156 else: |
1158 else: |
1157 rv[cls] = self.assembleHierarchy(cls, |
1159 rv[cls] = self.assembleHierarchy( |
1158 classes, path + [cls], result) |
1160 cls, classes, path + [cls], result) |
1159 |
1161 |
1160 if len(rv) == 0: |
1162 if len(rv) == 0: |
1161 exhausted = path |
1163 exhausted = path |
1162 exhausted.reverse() |
1164 exhausted.reverse() |
1163 self.addPathToHierarchy(exhausted, result, self.addPathToHierarchy) |
1165 self.addPathToHierarchy(exhausted, result, self.addPathToHierarchy) |