File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,12 @@ style from Drupal."
721721 (search-forward " SpaceName" )
722722 (goto-char (match-beginning 0 ))
723723 (should (eq 'php-constant
724- (get-text-property (point ) 'face )))))
724+ (get-text-property (point ) 'face )))
725+ (search-forward-regexp " \\\\ My_\\ (Class\\ )" )
726+ (should (eq 'php-constant
727+ (get-text-property (match-beginning 0 ) 'face )))
728+ (should (eq 'php-constant
729+ (get-text-property (match-beginning 1 ) 'face )))))
725730
726731(ert-deftest php-mode-test-variables()
727732 " Proper highlighting for variables."
Original file line number Diff line number Diff line change @@ -1565,8 +1565,8 @@ a completion list."
15651565 (" )\\ s-*:\\ s-*\\ ??\\ (array\\ )\\ b" 1 font-lock-type-face )
15661566
15671567 ; ; namespaces
1568- (" \\ (\\ ([a-zA-Z0-9 ]+\\\\\\ )+[a-zA-Z0-9 ]+\\ |\\ (\\\\ [a-zA-Z0-9 ]+\\ )+\\ )[^:a-zA-Z0-9 \\\\ ]" 1 'font-lock-type-face )
1569- (" \\ (\\ ([a-zA-Z0-9 ]+\\\\\\ )+[a-zA-Z0-9 ]+\\ |\\ (\\\\ [a-zA-Z0-9 ]+\\ )+\\ )::" 1 'php-constant )
1568+ (" \\ (\\ ([a-zA-Z0-9_ ]+\\\\\\ )+[a-zA-Z0-9_ ]+\\ |\\ (\\\\ [a-zA-Z0-9_ ]+\\ )+\\ )[^:a-zA-Z0-9_ \\\\ ]" 1 'font-lock-type-face )
1569+ (" \\ (\\ ([a-zA-Z0-9_ ]+\\\\\\ )+[a-zA-Z0-9_ ]+\\ |\\ (\\\\ [a-zA-Z0-9_ ]+\\ )+\\ )::" 1 'php-constant )
15701570
15711571 ; ; Support the ::class constant in PHP5.6
15721572 (" \\ sw+\\ (::\\ )\\ (class\\ )\\ b" (1 'php-paamayim-nekudotayim ) (2 'php-constant )))
Original file line number Diff line number Diff line change 1212// When calling a method, the class name should be highlighted with
1313// the constant face. Just like c++-mode "NS::Class::method()"
1414ClassName::method ();
15- \SpaceName \ClassName::method ();
15+ \SpaceName \ClassName::method ();
16+ \My_Class::method ();
You can’t perform that action at this time.
0 commit comments