Skip to content

Commit 7f0d919

Browse files
author
Ξrwᴧn Richᴧrd
committed
Merge pull request #78 from ptcong/fix-find-methods
fix parse methods
2 parents 7dbd6d0 + fa00422 commit 7f0d919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_companion/commands/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def run(self, edit, path):
2020
with open(self.normalize_to_system_style_path(path), "r") as f:
2121
content = f.read()
2222

23-
pattern = "(?<!\* )(?:abstract )?((?:public|protected|private)(?: static)? function [\w]+\s*\(.*?\))\s*;"
23+
pattern = "(?<!\* )(?:abstract )?((?:public|protected|private)(?: static)?\s+function\s+[\w]+\s*\(.*?\))(?:\s*;|.*?{)"
2424
# Get the methods from the content
2525
self.methods = re.findall(pattern, content, re.S)
2626

0 commit comments

Comments
 (0)