Skip to content

Commit

Permalink
Merge pull request #78 from ptcong/fix-find-methods
Browse files Browse the repository at this point in the history
fix parse methods
  • Loading branch information
Ξrwᴧn Richᴧrd committed Jun 9, 2016
2 parents 7dbd6d0 + fa00422 commit 7f0d919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php_companion/commands/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def run(self, edit, path):
with open(self.normalize_to_system_style_path(path), "r") as f:
content = f.read()

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

Expand Down

0 comments on commit 7f0d919

Please sign in to comment.