Summary: | phpsupport doesn't handle reference operator for functions | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Klaus Dorninger <klaus> |
Component: | Language Support: PHP | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
a quick patch to make it work as expected
patch against cvs version 1.15 |
Description
Klaus Dorninger
2003-06-17 02:10:59 UTC
Created attachment 1829 [details]
a quick patch to make it work as expected
Subject: kdevelop/parts/phpsupport CVS commit by aclu: Fix the php parser to parse functions which are returning by reference. (BR 59921) i.e: class foo { var $data; function &bar() { return $data; } } Patch by: Klaus Dorninger ( klaus in xweb.cc) CCMAIL: 59921-done@bugs.kde.org M +2 -2 phpparser.cpp 1.15 --- kdevelop/parts/phpsupport/phpparser.cpp #1.14:1.15 @@ -146,7 +146,7 @@ void PHPParser::parseFile(const QString& KRegExp classre("^[ \t]*class[ \t]+([A-Za-z_]+)[ \t]*(extends[ \t]*([A-Za-z_]+))?.*$"); - KRegExp methodre("^[ \t]*function[ \t]*([0-9A-Za-z_]*)[ \t]*\\(([0-9A-Za-z_\\$\\, \t=&\\'\\\"]*)\\).*$"); + KRegExp methodre("^[ \t]*function[ \t&]*([0-9A-Za-z_]*)[ \t]*\\(([0-9A-Za-z_\\$\\, \t=&\\'\\\"]*)\\).*$"); KRegExp varre("^[ \t]*var[ \t]*([0-9A-Za-z_\\$]+)[ \t;=].*$"); - KRegExp createMemberRe("\\$this->([0-9A-Za-z_]+)[ \t]*=[ \t]*new[ \t]+([0-9A-Za-z_]+)"); + KRegExp createMemberRe("\\$this->([0-9A-Za-z_]+)[ \t]*=[ \t&]*new[ \t]+([0-9A-Za-z_]+)"); ParsedClass *lastClass = 0; Created attachment 2289 [details]
patch against cvs version 1.15
the old patch was applied only to the section of the code which is commented
out, so nothing was fixed, I've created another patch against the current cvs
which doesn't only fix the regexps but also removes the unused code block (why
is it still there anyway?)
see comment #3 Subject: kdevelop/parts/phpsupport CVS commit by aclu: Fix the previous patch Patch by: Klaus Dorninger ( klaus in xweb.cc) CCMAIL: 59921-done@bugs.kde.org M +2 -105 phpparser.cpp 1.16 |