[TxMt] Possible syntax parsing bug

Dominique PERETTI dperetti at lachoseinteractive.net
Sun May 29 15:05:43 UTC 2005


I'm replying to myself because I got it. This is not a parsing bug,  
this is probably just related to the definition file.

$smarty->template_dir doesn't work
$smarty->$template_dir would work.

However, this is beyond my knowledge of the syntax definition system.  
How to define a string that would match the "->" in "->anything" and  
be consistent with the keyword.construct.php scope ?

Dominique.

On 29 mai 05, at 16:45, Dominique PERETTI wrote:

> Still experimenting with the new theme system, I came across this  
> problem in the default PHP bundle  : I want to hilight "->"  
> operator, like in :
> $smarty->template_dir
> Tried to add my own, no success (the ctrl-shift T tooltip says the  
> scope is source.php).
> Then I realized the right syntax existed in the Bundle :
>
>
>  <dict>
>      <key>match</key>
>      <string>(::|->)|\b(abstract|cl(ass|one)|extends|function|i 
> (mplements|nterface)|new|parent|self|__(autoload|c(all|lone| 
> onstruct)|destruct|get|s(et|leep)|toString|wakeup))\b</string>
>      <key>name</key>
>      <string>keyword.construct.php</string>
>  </dict>
>
> (note the -> )
>
> It seems correct, but it turns out that "->" is not matched in the  
> string "$smarty->template" but it is when it's surrounded by  
> spaces : "$smarty -> template".
>
> Am I wrong to say it looks like a parsing bug ?
>
> Dominique.
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>




More information about the textmate mailing list