@@ -413,6 +413,10 @@ In that case set to `NIL'."
413413 (left-assoc " \\ " " ::" " ->" )
414414 (prefix " \\ " " ::" )))
415415
416+ (c-lang-defconst c-operators
417+ php (delete '(postfix-if-paren " <" " >" )
418+ (c-lang-const c-operators)))
419+
416420; ; Allow '\' when scanning from open brace back to defining
417421; ; construct like class
418422(c-lang-defconst c-block-prefix-disallowed-chars
@@ -469,35 +473,32 @@ PHP does not have an \"enum\"-like keyword."
469473 php '(" implements" " extends" ))
470474
471475(c-lang-defconst c-type-list-kwds
472- php '(" new" " use" " implements" " extends" " namespace" " instanceof" " insteadof" ))
476+ php '(" @new" ; ; @new is *NOT* language construct, it's workaround for coloring.
477+ " new" " use" " implements" " extends" " namespace" " instanceof" " insteadof" ))
473478
474479(c-lang-defconst c-ref-list-kwds
475480 php nil )
476481
477482(c-lang-defconst c-block-stmt-2-kwds
478- php (append '(" elseif" " foreach" " declare" )
479- (remove " synchronized" (c-lang-const c-block-stmt-2-kwds))))
483+ php '(" catch" " declare" " elseif" " for" " foreach" " if" " switch" " while" ))
480484
481485(c-lang-defconst c-simple-stmt-kwds
482- php (append '(" include" " include_once" " require" " require_once"
483- " echo" " print" " die" " exit" )
484- (c-lang-const c-simple-stmt-kwds)))
486+ php '(" break" " continue" " die" " echo" " exit" " goto" " return" " throw"
487+ " include" " include_once" " print" " require" " require_once" ))
485488
486489(c-lang-defconst c-constant-kwds
487- php '(" true"
488- " false"
489- " null" ))
490+ php '(" true" " false" " null" ))
490491
491492(c-lang-defconst c-lambda-kwds
492- php '(" function"
493- " use" ))
493+ php '(" function" " use" ))
494494
495495(c-lang-defconst c-other-block-decl-kwds
496496 php '(" namespace" ))
497497
498498(c-lang-defconst c-other-kwds
499499 " Keywords not accounted for by any other `*-kwds' language constant."
500- php '(
500+ php
501+ '(
501502 " __halt_compiler"
502503 " and"
503504 " array"
@@ -546,6 +547,12 @@ PHP does not have an \"enum\"-like keyword."
546547(c-lang-defconst c-recognize-<>-arglists
547548 php nil )
548549
550+ (c-lang-defconst c-<>-type-kwds
551+ php nil )
552+
553+ (c-lang-defconst c-inside-<>-type-kwds
554+ php nil )
555+
549556(c-lang-defconst c-enums-contain-decls
550557 php nil )
551558
@@ -569,6 +576,13 @@ might be to handle switch and goto labels differently."
569576 php (cl-remove-if (lambda (elm ) (and (listp elm) (equal (car elm) " \\ s|" )))
570577 (c-lang-const c-basic-matchers-before php)))
571578
579+ (c-lang-defconst c-basic-matchers-after
580+ php (cl-remove-if (lambda (elm ) (and (listp elm) (memq 'c-annotation-face elm)))
581+ (c-lang-const c-basic-matchers-after php)))
582+
583+ (c-lang-defconst c-opt-<>-sexp-key
584+ php nil )
585+
572586(defun php-lineup-cascaded-calls (langelem )
573587 " Line up chained methods using `c-lineup-cascaded-calls' ,
574588but only if the setting is enabled"
@@ -1431,6 +1445,7 @@ a completion list."
14311445 ; ; already fontified by another pattern. Note that using OVERRIDE
14321446 ; ; is usually overkill.
14331447 `(
1448+ (" \\ <\\ (@\\ )" 1 'php-errorcontrol-op )
14341449 ; ; Highlight all upper-cased symbols as constant
14351450 (" \\ <\\ ([A-Z_][A-Z0-9_]+\\ )\\ >" 1 'php-constant )
14361451
0 commit comments