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