Tomas Hajny
Mon, 12 May 2008 01:25:30 -0700
On Mon, May 12, 2008 08:08, Brian Havard wrote: > Krzysztof Trybowski wrote:
Hello Brian,
>> Hello Brian,
>> On Wednesday, May 7, 2008 Brian Havard wrote:
>>
>>> Krzysztof Trybowski wrote:
>>>
>>>> Hello all, Brian,
>>>>
>>>> I need PHP syntax highlighting in FCW. Can I download it somewhere?
>>>>
>>> If you can point me at a list of php keywords I could probably add it
>>> pretty quickly. Or has someone already done one?
>>
>> OK, so I use the code from Steven Grim now. But there seems to be an
>> error (or a lack of feature, or I just don't know how to do it):
>>
>> in PHP you can have two formats of line comments:
>>
>> //this is a comment
>>
>> #this is a comment too.
>>
>> How do I set that? I tried:
>>
>> linecomment : comment : #
>> linecomment : comment : //
>>
>> but it seems the later overrides the former.
>>
> Yes, the syntax highlighter only supports one type of line comment
> marker (I guess I didn't think any language needed more than 1...). I'll
> take a look at adding support for multiple.
While looking at the syntax highlighting support, could you please have a
look on how to enable nicer HTML parsing? I currently use the following
fragment for HTML syntax highlighting (kind of hack indeed ;-) ), but it's
far from being perfect:
[HTML : *.{htm}*]
symbols : type : #%
symbols : keyword : <
string : string : "
words : operators : &&
blockcomment : keyword : > : <
blockcomment : comment : <!-- : -->
blockcomment/i : style : <style> : </style>
blockcomment/i : function : <script : </script>
blockcomment : operators : & : ;
number : number
Main issues:
- (Kind of minor thing) "<" and ">" tag markers are highlighted the same
way as the surrounding text, not as part of the tag.
- Although I tried defining (block) comments above, they do not work at
all and are thus parsed the same way as remaining part of the file (I
understand the reasons, but I didn't find a way how to do it properly).
Thanks a lot
Tomas
_______________________________________________
Fc mailing list
Fc@silk.apana.org.au
http://silk.apana.org.au/mailman/listinfo/fc
Bug Tracker: http://bugs.silk.apana.org.au/