@@ -413,6 +413,10 @@ In that case set to `NIL'."
413
413
(left-assoc " \\ " " ::" " ->" )
414
414
(prefix " \\ " " ::" )))
415
415
416
+ (c-lang-defconst c-operators
417
+ php (delete '(postfix-if-paren " <" " >" )
418
+ (c-lang-const c-operators)))
419
+
416
420
; ; Allow '\' when scanning from open brace back to defining
417
421
; ; construct like class
418
422
(c-lang-defconst c-block-prefix-disallowed-chars
@@ -469,35 +473,32 @@ PHP does not have an \"enum\"-like keyword."
469
473
php '(" implements" " extends" ))
470
474
471
475
(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" ))
473
478
474
479
(c-lang-defconst c-ref-list-kwds
475
480
php nil )
476
481
477
482
(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" ))
480
484
481
485
(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" ))
485
488
486
489
(c-lang-defconst c-constant-kwds
487
- php '(" true"
488
- " false"
489
- " null" ))
490
+ php '(" true" " false" " null" ))
490
491
491
492
(c-lang-defconst c-lambda-kwds
492
- php '(" function"
493
- " use" ))
493
+ php '(" function" " use" ))
494
494
495
495
(c-lang-defconst c-other-block-decl-kwds
496
496
php '(" namespace" ))
497
497
498
498
(c-lang-defconst c-other-kwds
499
499
" Keywords not accounted for by any other `*-kwds' language constant."
500
- php '(
500
+ php
501
+ '(
501
502
" __halt_compiler"
502
503
" and"
503
504
" array"
@@ -546,6 +547,12 @@ PHP does not have an \"enum\"-like keyword."
546
547
(c-lang-defconst c-recognize-<>-arglists
547
548
php nil )
548
549
550
+ (c-lang-defconst c-<>-type-kwds
551
+ php nil )
552
+
553
+ (c-lang-defconst c-inside-<>-type-kwds
554
+ php nil )
555
+
549
556
(c-lang-defconst c-enums-contain-decls
550
557
php nil )
551
558
@@ -569,6 +576,13 @@ might be to handle switch and goto labels differently."
569
576
php (cl-remove-if (lambda (elm ) (and (listp elm) (equal (car elm) " \\ s|" )))
570
577
(c-lang-const c-basic-matchers-before php)))
571
578
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
+
572
586
(defun php-lineup-cascaded-calls (langelem )
573
587
" Line up chained methods using `c-lineup-cascaded-calls' ,
574
588
but only if the setting is enabled"
@@ -1431,6 +1445,7 @@ a completion list."
1431
1445
; ; already fontified by another pattern. Note that using OVERRIDE
1432
1446
; ; is usually overkill.
1433
1447
`(
1448
+ (" \\ <\\ (@\\ )" 1 'php-errorcontrol-op )
1434
1449
; ; Highlight all upper-cased symbols as constant
1435
1450
(" \\ <\\ ([A-Z_][A-Z0-9_]+\\ )\\ >" 1 'php-constant )
1436
1451
0 commit comments