Syntax colouring: separating functions from identifiers

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
ingbodd
Posts: 11
Joined: Sun Oct 24, 2010 2:09 pm
Contact:

Syntax colouring: separating functions from identifiers

Post by ingbodd »

Rapid PHP 2010 v10.2

Hi,
Is there a way of differentiating recognised functions from other identifiers like constructs? i.e. completing 'echo' alters its colour, how can I replicate for recognised function calls (and user defined functions)?
Useful for highlighting typos.
ingbodd
Posts: 11
Joined: Sun Oct 24, 2010 2:09 pm
Contact:

Re: Syntax colouring: separating functions from identifiers

Post by ingbodd »

Is it clear what I mean?
Anyone have any ideas? :(
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Syntax colouring: separating functions from identifiers

Post by Gatis »

Hi,

You can try to modify the PHP Parser file, which defines the keywords; by adding the recognized functions as PHP keywords.
But this might slow down the editor, so do it at your own risk.

The PHP parser file can be found under WeBuilder installation directory: C:\Program Files\WeBuilder 2010\data\parsers\phpparser.dat

Open the file and add the functions under section "// reswords" for PHP in the same manner as other reserved words are listed:
shtmlPHP 'case' shtmlPHP tphpresword

I hope this helps.

Gatis
Kind regards,
Gatis Avots
ingbodd
Posts: 11
Joined: Sun Oct 24, 2010 2:09 pm
Contact:

Re: Syntax colouring: separating functions from identifiers

Post by ingbodd »

Hi,

Thanks for the reply Gatis. Will give this a try and see how it affects performance.
ingbodd
Posts: 11
Joined: Sun Oct 24, 2010 2:09 pm
Contact:

Re: Syntax colouring: separating functions from identifiers

Post by ingbodd »

I've had a go at this now, formatted some 4000 function names into the correct format for the parser file.
Worked without any issues, doesn't seem to have slowed down the editor at all.

Thanks for the help :)
Post Reply