Skip to content

Commit e890544

Browse files
committed
• add more extensive PHP doc matching (patch from Ciaran Walsh)
git-svn-id: http://svn.textmate.org/trunk/Bundles/PHP.tmbundle@6627 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
1 parent 7c06df2 commit e890544

File tree

1 file changed

+81
-4
lines changed

1 file changed

+81
-4
lines changed

Syntaxes/PHP.plist

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,8 @@
224224
<key>patterns</key>
225225
<array>
226226
<dict>
227-
<key>match</key>
228-
<string>\@(a(ccess|uthor)|c(ategory|opyright)|global|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final)\b</string>
229-
<key>name</key>
230-
<string>keyword.other.phpdoc.php</string>
227+
<key>include</key>
228+
<string>#php_doc</string>
231229
</dict>
232230
</array>
233231
</dict>
@@ -1292,6 +1290,85 @@
12921290
<key>name</key>
12931291
<string>constant.language.php</string>
12941292
</dict>
1293+
<key>php_doc</key>
1294+
<dict>
1295+
<key>patterns</key>
1296+
<array>
1297+
<dict>
1298+
<key>comment</key>
1299+
<string>PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character</string>
1300+
<key>match</key>
1301+
<string>^(?!\s*\*( |/?\s*$)).*$\n?</string>
1302+
<key>name</key>
1303+
<string>invalid.illegal</string>
1304+
</dict>
1305+
<dict>
1306+
<key>captures</key>
1307+
<dict>
1308+
<key>1</key>
1309+
<dict>
1310+
<key>name</key>
1311+
<string>keyword.other.phpdoc.php</string>
1312+
</dict>
1313+
<key>3</key>
1314+
<dict>
1315+
<key>name</key>
1316+
<string>storage.modifier.php</string>
1317+
</dict>
1318+
<key>4</key>
1319+
<dict>
1320+
<key>name</key>
1321+
<string>invalid.illegal</string>
1322+
</dict>
1323+
</dict>
1324+
<key>match</key>
1325+
<string>^\s*\*\s*(@access)\s+((public|private|protected)|(.+))\s*$</string>
1326+
</dict>
1327+
<dict>
1328+
<key>match</key>
1329+
<string>((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&amp;#]+(?&lt;![.?:])</string>
1330+
<key>name</key>
1331+
<string>markup.underline.link</string>
1332+
</dict>
1333+
<dict>
1334+
<key>captures</key>
1335+
<dict>
1336+
<key>1</key>
1337+
<dict>
1338+
<key>name</key>
1339+
<string>keyword.other.phpdoc.php</string>
1340+
</dict>
1341+
<key>2</key>
1342+
<dict>
1343+
<key>name</key>
1344+
<string>markup.underline.link</string>
1345+
</dict>
1346+
</dict>
1347+
<key>match</key>
1348+
<string>(@xlink)\s+(.+)\s*$</string>
1349+
</dict>
1350+
<dict>
1351+
<key>match</key>
1352+
<string>\@(a(bstract|uthor)|c(ategory|opyright)|global|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final)\b</string>
1353+
<key>name</key>
1354+
<string>keyword.other.phpdoc.php</string>
1355+
</dict>
1356+
<dict>
1357+
<key>captures</key>
1358+
<dict>
1359+
<key>1</key>
1360+
<dict>
1361+
<key>name</key>
1362+
<string>keyword.other.phpdoc.php</string>
1363+
</dict>
1364+
</dict>
1365+
<key>match</key>
1366+
<string>\{(@(link)).+?\}</string>
1367+
<key>name</key>
1368+
<string>meta.tag.inline.phpdoc.php</string>
1369+
</dict>
1370+
</array>
1371+
</dict>
12951372
<key>string-backtick</key>
12961373
<dict>
12971374
<key>begin</key>

0 commit comments

Comments
 (0)