@@ -1275,7 +1275,7 @@ for \\[find-tag] (which see)."
12751275 (message " Unknown function: %s " tagname))))
12761276
12771277; ; Font Lock
1278- (defconst php-phpdoc-type-keywords
1278+ (defconst php-phpdoc-type-names
12791279 (list " string" " integer" " int" " boolean" " bool" " float"
12801280 " double" " object" " mixed" " array" " resource"
12811281 " void" " null" " false" " true" " self" " static"
@@ -1287,11 +1287,18 @@ for \\[find-tag] (which see)."
12871287 " never" " never-return" " never-returns" " no-return" " non-empty-array"
12881288 " non-empty-list" " non-empty-string" " non-falsy-string"
12891289 " 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" )
12911294
12921295(defconst php-phpdoc-type-tags
12931296 (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." )
12951302
12961303(defconst php-phpdoc-font-lock-doc-comments
12971304 `((" {@[-[:alpha:]]+\\ s-*\\ ([^}]*\\ )}" ; "{@foo ...}" markup.
@@ -1301,11 +1308,11 @@ for \\[find-tag] (which see)."
13011308 (1 'php-doc-variable-sigil prepend nil )
13021309 (2 'php-variable-name prepend nil ))
13031310 (" \\ (\\ $\\ )\\ (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-+"
13051312 " \\ (" (rx (+ (? " ?" ) (? " \\ " ) (+ (in " 0-9A-Z_a-z" )) (? " []" ) (? " |" ))) " \\ )+" )
13061313 1 'php-string prepend nil )
13071314 (,(concat " \\ (?:|\\ |\\ ?\\ |\\ s-\\ )\\ ("
1308- (regexp-opt php-phpdoc-type-keywords 'words )
1315+ (regexp-opt php-phpdoc-type-names 'words )
13091316 " \\ )" )
13101317 1 font-lock-type-face prepend nil )
13111318 (" https?://[^\n\t ]+"
0 commit comments