File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -325,12 +325,18 @@ can be used to match against definitions for that classlike."
325325 ; ; First see if 'abstract' or 'final' appear, although really these
326326 ; ; are not valid for all values of `type' that the function
327327 ; ; accepts.
328- " ^\\ s-*\\ (?:\\ (?:abstract\\ |final\\ )\\ s-+\\ )?"
328+ (eval-when-compile
329+ (rx line-start
330+ (* (syntax whitespace))
331+ (? (or " abstract" " final" " readonly" )
332+ (+ (syntax whitespace)))))
329333 ; ; The classlike type
330334 type
331335 ; ; Its name, which is the first captured group in the regexp. We
332336 ; ; allow backslashes in the name to handle namespaces, but again
333337 ; ; this is not necessarily correct for all values of `type' .
338+ ; ; (rx (+ (syntax whitespace))
339+ ; ; (group (+ (or (syntax word) "\\ " (syntax symbol)))))
334340 " \\ s-+\\ (\\ (?:\\ sw\\ |\\\\\\ |\\ s_\\ )+\\ )" )))
335341
336342(defconst php-imenu-generic-expression-default
@@ -465,7 +471,7 @@ can be used to match against definitions for that classlike."
465471
466472(defconst php--re-classlike-pattern
467473 (eval-when-compile
468- (php-create-regexp-for-classlike (regexp-opt '(" class" " interface" " trait" )))))
474+ (php-create-regexp-for-classlike (regexp-opt '(" class" " interface" " trait" " enum " )))))
469475
470476(defvar php--analysis-syntax-table
471477 (eval-when-compile
You can’t perform that action at this time.
0 commit comments