Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Changed variable name to php-phpdoc-type-names to avoid confusion
  • Loading branch information
zonuexe committed Nov 3, 2022
commit 08776c1b50dc58622ff8da732bbbd6c1d99d78f3
9 changes: 6 additions & 3 deletions lisp/php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ for \\[find-tag] (which see)."
(message "Unknown function: %s" tagname))))

;; Font Lock
(defconst php-phpdoc-type-keywords
(defconst php-phpdoc-type-names
(list "string" "integer" "int" "boolean" "bool" "float"
"double" "object" "mixed" "array" "resource"
"void" "null" "false" "true" "self" "static"
Expand All @@ -1287,7 +1287,10 @@ for \\[find-tag] (which see)."
"never" "never-return" "never-returns" "no-return" "non-empty-array"
"non-empty-list" "non-empty-string" "non-falsy-string"
"numeric" "numeric-string" "positive-int" "scalar"
"trait-string" "truthy-string" "key-of" "value-of"))
"trait-string" "truthy-string" "key-of" "value-of")
"A list of type and pseudotype names that can be used in PHPDoc.")

(make-obsolete-variable 'php-phpdoc-type-keywords 'php-phpdoc-type-names "1.24.2")

(defconst php-phpdoc-type-tags
(list "package" "param" "property" "property-read" "property-write"
Expand All @@ -1305,7 +1308,7 @@ for \\[find-tag] (which see)."
"\\(" (rx (+ (? "?") (? "\\") (+ (in "0-9A-Z_a-z")) (? "[]") (? "|"))) "\\)+")
1 'php-string prepend nil)
(,(concat "\\(?:|\\|\\?\\|\\s-\\)\\("
(regexp-opt php-phpdoc-type-keywords 'words)
(regexp-opt php-phpdoc-type-names 'words)
"\\)")
1 font-lock-type-face prepend nil)
("https?://[^\n\t ]+"
Expand Down