[Geany-devel] [Patch] - Improve PHP parser (call tips)

Harold Aling geany at xxxxx
Wed Apr 14 13:14:47 UTC 2010


2010/3/7 Enrico Tröger <enrico.troeger at uvena.de>:
> On Fri, 5 Mar 2010 12:21:25 -0800 (PST), Can wrote:
>
>>Hi,
>>The following patch adds call tips for functions in PHP code.
>>The regex pattern for function parameters is not optimal, but should
>>work for most cases. When you have a problem, send the relevant
>>function definition so that I can improve the patch.
>
> Awesome (though I still think it'd be better in thelong term to write
> a C-based, real parser insteaf of fiddling with regexps).
...
> For the meantime, committed.

I just found a 'bug' in the code:

"function my_func($var1, $var2 = array(), $var3 = NULL) { ... }" only
shows "my_func($var1, $var2 = array()"

So it stops at the first ")" it finds instead of the real closing ")".

-H-



More information about the Devel mailing list