changeset 27584 | fc7c8cac6a4b |
parent 27583 | 37d50250b696 |
child 27585 | 60bf90eb8bf8 |
--- a/mercurial/registrar.py Tue Dec 29 23:58:30 2015 +0900 +++ b/mercurial/registrar.py Tue Dec 29 23:58:30 2015 +0900 @@ -70,6 +70,15 @@ """ return self.decl + def parsefuncdecl(self): + """Parse function declaration and return the name of function in it + """ + i = self.decl.find('(') + if i > 0: + return self.decl[:i] + else: + return self.decl + def formatdoc(self, doc): """Return formatted document of the registered function for help