DONE? Highlight fully qualified PHP function calls

Make a request or discuss new features.
Post Reply
User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

DONE? Highlight fully qualified PHP function calls

Post by pjj »

Apparently you can get a little performance boost in PHP by using fully qualified function calls, i.e. by writing backslash before (some) functions. As of now, RJ TE can't recognize functions' names preceded by this char:
fq_func_name.png
fq_func_name.png (4.39 KiB) Viewed 435 times
Could you please add support for it, just as negation (i.e. !) is supported?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 6091
Joined: 19 Jul 2006 14:29

Re: Highlight fully qualified PHP function calls

Post by Rickard Johansson »

Made some extensive changes to the PHP syntax file to use regular expressions for class and functions. It should handle qualified PHP function calls.

Please test it and let me know what you think.
syntax.zip
(2.84 KiB) Downloaded 37 times

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Highlight fully qualified PHP function calls

Post by pjj »

Frankly, I'm not sure where to look; I can't see any difference, with one exception: there's no "function" entry in theme's customization window, so functions aren't highlighted at all. Is it your intention?

Btw, is language server going to support semantic highlighting somehow? If so, perhaps it's better to implement any changes in syntax files later, provided you want to support semantic highlighting at all ;)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Post Reply