--
You received this message because you are subscribed to the Google Groups "Bespin" group.
To post to this group, send email to bes...@googlegroups.com.
To unsubscribe from this group, send email to bespin+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bespin?hl=en.
Are there plans to officially support PHP. I get a feeling it's not going to be that simple. I think it's going to be way beyond me.
It is exactly the kind of thing that I'd like to see lovingly supported in a plugin by someone who cares about PHP.
I've talked about the possibility of having the standard syntax
highlighter able to be in multiple states at the same time. Then you'd
be able to have a state that looks something like this (pseudocode):
maybePHP: [
{
regex: /<\?php>/,
then: 'start:php endPHP'
},
{
regex: /[^<]+/
}
],
endPHP: ...
And you'd be in that state at the same time the main HTML highlighter is
running. This would support PHP.
The other advantage of having the syntax highlighter support multiple
states would be to get "pattern"-like functionality, as Julian mentioned
earlier.
Patrick
This is not a good use case for patterns, as there a no states within patterns...
What about this:
Optional to each syntax highlighter, you can define a state which starts the highlighter and stops it again, for instance something that matches
<?php
starts always the php highlighter. If you then can match
?>
the php highlighter is stopped. This is independent from the current syntax highlighter state (if in quotes or just plain text).
In the html highlighter could be a section like
canHave: [php, css, js].
This makes the html highlighter care of php highlighter and kicks it in if there is a <?php.
Julian