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

Enrico Tröger enrico.troeger at xxxxx
Sat Apr 17 16:16:23 UTC 2010


On Wed, 14 Apr 2010 15:14:47 +0200, Harold wrote:

>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 ")".

Should be fixed in SVN r4830.
Thanks for testing and reporting.

I also tried to fix the remaining bugs with the function parsing regexp
which I think I did in SVN r4828.

I guess you'll tell me if I'm wrong :).

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100417/1b43cfe3/attachment.pgp>


More information about the Devel mailing list