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

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

[elpa] externals/phps-mode 16c15c9ef4 004/212: Added type check to imenu


From: Christian Johansson
Subject: [elpa] externals/phps-mode 16c15c9ef4 004/212: Added type check to imenu-index generation
Date: Wed, 26 Jan 2022 01:50:08 -0500 (EST)

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

    Added type check to imenu-index generation
---
 test/phps-mode-test-parser.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/phps-mode-test-parser.el b/test/phps-mode-test-parser.el
index 0ebc4ccaa7..62e64bf11b 100644
--- a/test/phps-mode-test-parser.el
+++ b/test/phps-mode-test-parser.el
@@ -463,16 +463,25 @@
             ast))
 
          (message "\nAST:\n%S\n" ast)
+
          (let ((imenu-index))
            (dolist (item ast)
              (let ((children (plist-get item 'children))
+                   (item-type (plist-get item 'type))
                    (parent))
-               (if children
+               (if (and
+                    (or
+                     (equal item-type 'namespace)
+                     (equal item-type 'class))
+                    children)
                    (progn
                      (dolist (child children)
                        (let ((grandchildren (plist-get child 'children))
+                             (child-type (plist-get child 'type))
                              (subparent))
-                         (if grandchildren
+                         (if (and
+                              (equal child-type 'class)
+                              grandchildren)
                              (progn
                                (dolist (grandchild grandchildren)
                                  (push



reply via email to

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