@@ -1275,7 +1275,7 @@ for \\[find-tag] (which see)."
1275
1275
(message " Unknown function: %s " tagname))))
1276
1276
1277
1277
; ; Font Lock
1278
- (defconst php-phpdoc-type-keywords
1278
+ (defconst php-phpdoc-type-names
1279
1279
(list " string" " integer" " int" " boolean" " bool" " float"
1280
1280
" double" " object" " mixed" " array" " resource"
1281
1281
" void" " null" " false" " true" " self" " static"
@@ -1287,11 +1287,18 @@ for \\[find-tag] (which see)."
1287
1287
" never" " never-return" " never-returns" " no-return" " non-empty-array"
1288
1288
" non-empty-list" " non-empty-string" " non-falsy-string"
1289
1289
" numeric" " numeric-string" " positive-int" " scalar"
1290
- " trait-string" " truthy-string" " key-of" " value-of" ))
1290
+ " trait-string" " truthy-string" " key-of" " value-of" )
1291
+ " A list of type and pseudotype names that can be used in PHPDoc." )
1292
+
1293
+ (make-obsolete-variable 'php-phpdoc-type-keywords 'php-phpdoc-type-names " 1.24.2" )
1291
1294
1292
1295
(defconst php-phpdoc-type-tags
1293
1296
(list " package" " param" " property" " property-read" " property-write"
1294
- " return" " throws" " var" " self-out" " this-out" " param-out" ))
1297
+ " return" " throws" " var" " self-out" " this-out" " param-out"
1298
+ " type" " extends" " require-extends" " implemtents" " require-implements"
1299
+ " template" " template-covariant" " template-extends" " template-implements"
1300
+ " assert" " assert-if-true" " assert-if-false" " if-this-is" )
1301
+ " A list of tags specifying type names." )
1295
1302
1296
1303
(defconst php-phpdoc-font-lock-doc-comments
1297
1304
`((" {@[-[:alpha:]]+\\ s-*\\ ([^}]*\\ )}" ; "{@foo ...}" markup.
@@ -1301,11 +1308,11 @@ for \\[find-tag] (which see)."
1301
1308
(1 'php-doc-variable-sigil prepend nil )
1302
1309
(2 'php-variable-name prepend nil ))
1303
1310
(" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-doc-$this-sigil prepend nil ) (2 'php-doc-$this prepend nil ))
1304
- (,(concat " \\ s-@" (rx (? (or " phpstan" " psalm" ) " -" )) (regexp-opt php-phpdoc-type-tags) " \\ s-+"
1311
+ (,(concat " \\ s-@" (rx (? (or " phan " " phpstan" " psalm" ) " -" )) (regexp-opt php-phpdoc-type-tags) " \\ s-+"
1305
1312
" \\ (" (rx (+ (? " ?" ) (? " \\ " ) (+ (in " 0-9A-Z_a-z" )) (? " []" ) (? " |" ))) " \\ )+" )
1306
1313
1 'php-string prepend nil )
1307
1314
(,(concat " \\ (?:|\\ |\\ ?\\ |\\ s-\\ )\\ ("
1308
- (regexp-opt php-phpdoc-type-keywords 'words )
1315
+ (regexp-opt php-phpdoc-type-names 'words )
1309
1316
" \\ )" )
1310
1317
1 font-lock-type-face prepend nil )
1311
1318
(" https?://[^\n\t ]+"
0 commit comments