Loading ...
Sorry, an error occurred while loading the content.

RFC: highlighting object references in php

Expand Messages
  • Justin Watt
    I m looking for a way to correctly highlight PHP object references: $my_object- some_method With the default php syntax file, editplus highlights my_object
    Message 1 of 1 , Sep 1, 2004
    • 0 Attachment
      I'm looking for a way to correctly highlight PHP object references:

      $my_object->some_method

      With the default php syntax file, editplus highlights "my_object" but not
      "some_method".

      By setting one of the prefix directives to ">", "some_method" will be
      highlighted, and you can then configure it to be the same color as the
      other variables--though I'm torn on whether I want to do so or not.

      I added the following line to my php.stx file, below #PREFIX3=$

      #PREFIX4=>

      Does anyone expect this to create any syntax highlighting errors in PHP?

      Ha: just discovered the first collision: if you use the greater-than sign
      without spacing things out (e.g., if (4>3) ) the "3" gets colorized. :(

      Anyone have any better suggestions? Unfortunately the #PREFIX directives
      only take single characters

      Thanks,
      Justin
    Your message has been successfully submitted and would be delivered to recipients shortly.