From df84b7e644dbc7f7e8733a7f8c77578dda155a5b Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 2 Aug 2021 00:59:37 +0900 Subject: [PATCH] Add PHP 8.1 readonly keyword https://wiki.php.net/rfc/readonly_properties_v2 --- lisp/php-mode.el | 2 +- tests/8.1/readonly.php | 20 +++++++++ tests/8.1/readonly.php.faces | 84 ++++++++++++++++++++++++++++++++++++ tests/php-mode-test.el | 3 +- 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 tests/8.1/readonly.php create mode 100644 tests/8.1/readonly.php.faces diff --git a/lisp/php-mode.el b/lisp/php-mode.el index 9fc2b7b7..822a455a 100644 --- a/lisp/php-mode.el +++ b/lisp/php-mode.el @@ -458,7 +458,7 @@ PHP does not have an C-like \"enum\" keyword." php (append (c-lang-const c-class-decl-kwds) '("function"))) (c-lang-defconst c-modifier-kwds - php '("abstract" "const" "final" "static" "case")) + php '("abstract" "const" "final" "static" "case" "readonly")) (c-lang-defconst c-protection-kwds "Access protection label keywords in classes." diff --git a/tests/8.1/readonly.php b/tests/8.1/readonly.php new file mode 100644 index 00000000..b7487243 --- /dev/null +++ b/tests/8.1/readonly.php @@ -0,0 +1,20 @@ +