[TxMt] Re: PHP Grammar / Syntax Highlight Bug

GreyWyvern bhuisman at greywyvern.com
Fri Jan 22 23:13:39 UTC 2010



Tobias Jung-2 wrote:
> 
> Well, they are not only unusually nested... additionally, they are not
> exactly what you might call "clean code"...
> 
> [snip]
> 
> I guess they are, but writing your PHP code in a different, cleaner and
> maybe even a teeny weeny bit faster code solves your problem, too:
> 
> <?php
> $str = array("Foo", "Bar");
> echo 'Name: ' . $str[($str[1]) ? 1 : 0]; // will echo "Name: Bar"
> 
> $insert = mysql_query('INSERT INTO `catalogue` SET
>   `model`="' . $_POST["page_row{$count}_model"] . '",
>   `type`="' . $_POST["page_row{$count}_type"] . '",
>   `updated`=UNIX_TIMESTAMP();');
> ?>
> 
> Kind regards,
> Tobias Jung

Thank you :)  I understand how to make my code work with TextMate's grammar
rules, however I would rather have the grammar rules work for all valid
syntax, rather than just "clean" syntax.

Just reporting what I'm finding here, is all; and hoping that TM's grammar
can be made more robust in this case.

Cheers,
Brian
-- 
View this message in context: http://old.nabble.com/PHP-Grammar---Syntax-Highlight-Bug-tp27280995p27281380.html
Sent from the textmate users mailing list archive at Nabble.com.




More information about the textmate mailing list