emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode b2454f1967 058/135: Bookkeeping of static cla


From: Christian Johansson
Subject: [elpa] externals/phps-mode b2454f1967 058/135: Bookkeeping of static class property
Date: Sun, 29 Jan 2023 03:11:04 -0500 (EST)

branch: externals/phps-mode
commit b2454f1967ae98aead75d1087e182c1c2ef6ca84
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Bookkeeping of static class property
---
 phps-mode-parser-sdt.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index ecd0168bc7..ac5fae8afe 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -3078,7 +3078,13 @@
      (cond
       ((equal attributed-class-statement-type 'property)
        (let ((property-list
-              (plist-get attributed-class-statement 'subject)))
+              (plist-get attributed-class-statement 'subject))
+             (is-static))
+         (when-let (property-modifiers
+                    (plist-get attributed-class-statement 'modifiers))
+           (dolist (modifier property-modifiers)
+             (when (equal modifier 'static)
+               (setq is-static t))))
          (dolist (property property-list)
            (let ((property-type
                   (plist-get property 'ast-type)))
@@ -3092,6 +3098,8 @@
                       (plist-get property 'ast-end))
                      (symbol-scope
                       phps-mode-parser-sdt--bookkeeping-namespace))
+                 (when is-static
+                   (push (list 'static) symbol-scope))
                  (push
                   (list
                    symbol-name
@@ -3419,7 +3427,7 @@
 (puthash 324 (lambda(args _terminals) args) 
phps-mode-parser--table-translations)
 
 ;; 325 ((variable_modifiers) (T_VAR))
-(puthash 325 (lambda(_args _terminals) 'public) 
phps-mode-parser--table-translations)
+(puthash 325 (lambda(_args _terminals) '(public)) 
phps-mode-parser--table-translations)
 
 ;; 326 ((method_modifiers) (%empty))
 (puthash 326 (lambda(_args _terminals) nil) 
phps-mode-parser--table-translations)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]