[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 807c834649 116/135: More work on imenu genera
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 807c834649 116/135: More work on imenu generation |
Date: |
Sun, 29 Jan 2023 03:11:10 -0500 (EST) |
branch: externals/phps-mode
commit 807c834649ff52ed2ae9bc76de4f5c84159d3cb8
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
More work on imenu generation
---
phps-mode-ast.el | 37 +++++++++++++++++++++++++++++++++----
phps-mode-parser-sdt.el | 2 +-
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/phps-mode-ast.el b/phps-mode-ast.el
index 2315456a83..dbe79d0d72 100644
--- a/phps-mode-ast.el
+++ b/phps-mode-ast.el
@@ -75,10 +75,39 @@
(phps-mode-debug-message
(message "\nTranslation:\n%S\n\n" translation))
- ;; TODO Build imenu in `phps-mode-parser-sdt-symbol-imenu' by collecting:
- ;; * `phps-mode-parser-sdt-symbol-imenu--classes'
- ;; * `phps-mode-parser-sdt-symbol-imenu--functions'
- ;; * `phps-mode-parser-sdt-symbol-imenu--namespaces'
+ ;; Convert imenu index from hash-table to list structure here
+ (let ((imenu-index))
+ (maphash
+ (lambda (k v)
+ (if (hash-table-p v)
+ (let ((v-list))
+ (maphash
+ (lambda (k2 v2)
+ (if hash-table-p v2
+ (let ((v2-list))
+ (maphash
+ (lambda (k3 v3)
+ (push
+ `(,k3 . ,v3)
+ v2-list))
+ v2)
+ (push
+ `(,k2 ,v2-list)
+ v-list))
+ (push
+ `(,k2 . ,v2)
+ v-list)))
+ v)
+ (push
+ `(,k ,v-list)
+ imenu-index))
+ (push
+ `(,k . ,v)
+ imenu-index)))
+ phps-mode-parser-sdt-symbol-imenu--table)
+ (setq
+ phps-mode-parser-sdt-symbol-imenu
+ imenu-index))
(setq
phps-mode-ast--tree
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index 016dce133f..48f9e5ad52 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -915,7 +915,7 @@
;; Collect namespace, class, interface, trait and function here
(dolist (symbol-scope-item symbol-scope)
(let ((symbol-scope-item-type (nth 0 symbol-scope))
- (symbol-scope-item-name (nth 1 symbol-scop)))
+ (symbol-scope-item-name (nth 1 symbol-scope)))
(cond
((equal symbol-scope-item-type 'namespace)
(setq symbol-namespace symbol-scope-item-name))
- [elpa] externals/phps-mode 18f1f12fc6 096/135: Added new bookkeeping test for class parameters in constructor method, (continued)
- [elpa] externals/phps-mode 18f1f12fc6 096/135: Added new bookkeeping test for class parameters in constructor method, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6d3cadbdf0 104/135: More integration of new imenu and bookkeeping via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 171e96b043 123/135: Fixes for some tests, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6944154fd3 125/135: Imenu via SDT passing some more tests, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d1b1fd0a19 071/135: Started bookkeeping of arrow function variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode ae68e19c0a 080/135: Passing bookkeeping arrow function, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f053587ff6 091/135: Passing another bookkeeping test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 9c43bc30c4 103/135: Removed old bookkeeping and imenu and integrated new via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode a447ae69ba 106/135: Starting on generating imenu index for namespaces, classes, methods, traits, interfaces via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 16a63da318 113/135: More TODO items for bookkeeping, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 807c834649 116/135: More work on imenu generation,
Christian Johansson <=
- [elpa] externals/phps-mode a84bfdccd3 120/135: More fighting the AST, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 23ba458f20 133/135: Updated version and date for 0.4.31, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d5bdadc6fc 135/135: Improved installation documentation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 8259e390b4 092/135: Added TODO item, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 9f21c86dd1 108/135: SDT integration now passing byte-compilation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode ddc5b5aa2a 112/135: Using sorted bookkeeping for test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode b7d5d7823c 118/135: Starting on sorting imenu, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode be00689e6f 119/135: Fixed sorting of imenu, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 330e6fd6cc 128/135: Superglobals and $this not included in imenu index, Christian Johansson, 2023/01/29