@@ -1325,10 +1325,17 @@ for \\[find-tag] (which see)."
1325
1325
" return" " throws" " var" " self-out" " this-out" " param-out"
1326
1326
" type" " extends" " require-extends" " implemtents" " require-implements"
1327
1327
" template" " template-covariant" " template-extends" " template-implements"
1328
- " require-extends" " require-implements"
1329
- " assert" " assert-if-true" " assert-if-false" " if-this-is" )
1328
+ " assert" " assert-if-true" " assert-if-false" )
1330
1329
" A list of tags specifying type names." )
1331
1330
1331
+ (defconst php-phpdoc-no-prefixed-tags
1332
+ (list " phpstan-require-extends" " phpstan-require-implements" " phpstan-sealed"
1333
+ " phpstan-self-out" " phpstan-this-out" " phpstan-type" " psalm-if-this-is"
1334
+ " psalm-import-type" " psalm-inheritors" " psalm-require-extends"
1335
+ " psalm-require-implements" " psalm-self-out" " psalm-this-out"
1336
+ " phan-type" " psalm-type" )
1337
+ " A list of tags specifying type with no-prefixed names." )
1338
+
1332
1339
(defconst php-phpdoc-font-lock-doc-comments
1333
1340
`((" {@[-[:alpha:]]+\\ s-*\\ ([^}]*\\ )}" ; "{@foo ...}" markup.
1334
1341
(0 'php-doc-annotation-tag prepend nil )
@@ -1337,7 +1344,13 @@ for \\[find-tag] (which see)."
1337
1344
(1 'php-doc-variable-sigil prepend nil )
1338
1345
(2 'php-variable-name prepend nil ))
1339
1346
(" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-doc-$this-sigil prepend nil ) (2 'php-doc-$this prepend nil ))
1340
- (,(concat " \\ s-@" (rx (? (or " phan" " phpstan" " psalm" ) " -" )) (regexp-opt php-phpdoc-type-tags) " \\ s-+"
1347
+ (,(concat " \\ s-@"
1348
+ (rx-to-string `(or (: (? (or " phan" " phpstan" " psalm" ) " -" )
1349
+ (or ,@php-phpdoc-type-tags ))
1350
+ ; (or ,@php-phpdoc-no-prefixed-tags)
1351
+ )
1352
+ t )
1353
+ " \\ s-+"
1341
1354
" \\ (" (rx (+ (? " ?" ) (? " \\ " ) (+ (in " 0-9A-Z_a-z" )) (? " []" ) (? " |" ))) " \\ )+" )
1342
1355
1 'php-string prepend nil )
1343
1356
(,(concat " \\ (?:|\\ |\\ ?\\ |\\ s-\\ )\\ ("
0 commit comments