【发布时间】:2014-09-16 14:19:01
【问题描述】:
我使用 Sublime Text 3 作为 PHP 编辑器,我一直在自定义 PHP.tmLanguage 文件以包含更多语法范围,现在我不知道如何捕获类方法调用。
$html = new HTML("hr");
$html->output_ml("moo");
output_ml 当前声明为范围 variable.other.property.php 我想添加一个范围以专门用于类方法调用,但在 tmLanguage 文件中定义正则表达式时遇到问题。
我试过了
<dict>
<key>match</key>
<string>(?i)\$[a-z_][a-z0-9_]*->([a-z_][a-z_0-9]*)\s*\(</string>
<key>name</key>
<string>meta.method-call.php</string>
</dict>
【问题讨论】:
-
那么到目前为止你尝试过什么?
-
我编辑了帖子以包含我尝试过的内容
标签: php regex syntax-highlighting sublimetext3 textmate