Discuss syntax highlighting or submit new syntax files.
kaaposc
Posts: 4 Joined: 28 Feb 2008 12:03
Post
by kaaposc » 28 Feb 2008 13:16
Hi!
It seems PHP heredoc strings are not treated as strings... Or am I mistaken with syntax coloring/syntax definitions?..
-- kaaposc
"The Knowledge is Power"
Rickard Johansson
Site Admin
Posts: 6799 Joined: 19 Jul 2006 14:29
Post
by Rickard Johansson » 28 Feb 2008 15:07
No, you are right. The syntax doesn't handle these strings properly. It is possible to handle them if yoy use a fixed identifier.
E.g.
Put this in the php.syx (I asume you use v4.20 beta 1)
[Block]
...
3_Name=HereDoc string
3_OnLine=No
3_AsString=Yes
3_Start<<<ID
3_End=ID
Now you should be able to use
... <<<ID
comments
ID;
Maybe not a perfect solution. I'll add a better one when I get the time. I need to add some new options to make it work properly.
kaaposc
Posts: 4 Joined: 28 Feb 2008 12:03
Post
by kaaposc » 28 Feb 2008 15:41
Thanks, I tried something like that, but with AsString=No because heredoc can contain PHP variables (so it would be nice to see them colored as variables)..
-- kaaposc
"The Knowledge is Power"