[TxMt] Possible syntax parsing bug

Dominique PERETTI dperetti at lachoseinteractive.net
Sun May 29 14:45:25 UTC 2005


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.



More information about the textmate mailing list