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

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

[elpa] externals/phps-mode 1017054 2/3: Bookkeeping for typed class prop


From: Christian Johansson
Subject: [elpa] externals/phps-mode 1017054 2/3: Bookkeeping for typed class properties now working
Date: Wed, 4 Aug 2021 11:06:23 -0400 (EDT)

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

    Bookkeeping for typed class properties now working
---
 phps-mode-lex-analyzer.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 490afc5..d121f00 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -1356,7 +1356,10 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
                       (unless bookkeeping-named
                         (when (and
                                imenu-in-class-name
-                               (equal previous-token 'T_STATIC)
+                               (or
+                                (equal previous-token 'T_STATIC)
+                                (equal previous2-token 'T_STATIC))
+                               (equal token 'T_VARIABLE)
                                (not imenu-in-function-declaration)
                                (not imenu-in-function-name))
                           (setq
@@ -1448,8 +1451,11 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
                         (setq bookkeeping-in-assignment t))
 
                       ;; In static variable declaration
-                      (when (and (equal previous-token 'T_STATIC)
-                                 (equal token 'T_VARIABLE))
+                      (when (and
+                             (or
+                              (equal previous-token 'T_STATIC)
+                              (equal previous2-token 'T_STATIC))
+                             (equal token 'T_VARIABLE))
                         (setq bookkeeping-in-assignment t))
 
                       ;; In [$abc, $def] = .. or array($abc, $def) = ...
@@ -1473,7 +1479,12 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
                               (equal previous-token 'T_PRIVATE)
                               (equal previous-token 'T_PROTECTED)
                               (equal previous-token 'T_PUBLIC)
-                              (equal previous-token 'T_VAR)))
+                              (equal previous-token 'T_VAR)
+                              (equal previous2-token 'T_STATIC)
+                              (equal previous2-token 'T_PRIVATE)
+                              (equal previous2-token 'T_PROTECTED)
+                              (equal previous2-token 'T_PUBLIC)
+                              (equal previous2-token 'T_VAR)))
                         (setq bookkeeping-in-assignment t))
 
                       ;; Do we have a assignment?



reply via email to

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