[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/parts/phpsupport
From: Amilcar do Carmo Lucas <amilcar () ida ! ing ! tu-bs ! de>
Date: 2003-07-28 16:20:11
[Download RAW message or body]
CVS commit by aclu:
The PHP Parser, when parsing a class called "mp3", only added "mp" to the class \
store. When looking at the source code, it tourned out, that the Parser also ignored \
files when they contained a special char, like the German umlauts, but they are \
allowed in PHP. This patch fixes this and makes the checking stricter.
If, for example, a variable begins with a figure, it is ignored and not added to the \
class store, because this is not allowed in PHP.
Thanks Sebastian Gutweiler < sebastian in gutweiler.net > for the patch.
M +4 -4 phpparser.cpp 1.12
--- kdevelop/parts/phpsupport/phpparser.cpp #1.11:1.12
@@ -32,8 +32,8 @@ PHPParser::~PHPParser(){
void PHPParser::parseLines(QStringList* lines,const QString& fileName){
kdDebug(9018) << "enter parsedLines" << endl;
- 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 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 classre("^[ \t]*class[ \
\t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*(extends[ \
\t]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))?.*$"); + KRegExp methodre("^[ \
\t]*function[ \t]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \
\t]*\\(([a-zA-Z_\x7f-\xff]*[0-9A-Za-z_\x7f-\xff\\$\\, \t=&\\'\\\"]*)\\).*$"); + \
KRegExp varre("^[ \t]*var[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \
\t;=].*$"); + KRegExp \
createMemberRe("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[\t]*new[ \
\t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
ParsedClass *lastClass = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic