[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 96eeff74f8 130/135: Added more todo items for
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 96eeff74f8 130/135: Added more todo items for bookkeeping and imenu |
Date: |
Sun, 29 Jan 2023 03:11:11 -0500 (EST) |
branch: externals/phps-mode
commit 96eeff74f85c180d88723c09700f97dc42b7efc2
Author: christian <christian@cvj.se>
Commit: christian <christian@cvj.se>
Added more todo items for bookkeeping and imenu
---
phps-mode-parser-sdt.el | 21 ++++++++++++++-------
test/phps-mode-test-ast.el | 4 ++--
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index b44ca19edf..853fa94320 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -841,6 +841,12 @@
;; (message "potential-uris: %S" potential-uris)
))
+ ((equal space-type 'object-operator)
+ (setq scope-object-operator space-name))
+
+ ((equal space-type 'static-member)
+ (setq scope-static-member space-name))
+
)))
(setq scope-index (1+ scope-index)))))
@@ -1596,6 +1602,7 @@
(symbol-object-operator
(nth 13 (nth 1 symbol-uri-object)))
(symbol-hit 0))
+
(unless (and
symbol-object-operator
(not (string= (downcase symbol-object-operator) "$this")))
@@ -1637,14 +1644,14 @@
(when (<= matching-symbol-start symbol-start)
(setq matching-hit t)
(setq symbol-hit matching-symbol-id)))
- (setq matching-symbol-index (1+ matching-symbol-index)))))))
+ (setq matching-symbol-index (1+ matching-symbol-index))))))
- (puthash
- (list
- symbol-start
- symbol-end)
- symbol-hit
- phps-mode-parser-sdt-bookkeeping)
+ (puthash
+ (list
+ symbol-start
+ symbol-end)
+ symbol-hit
+ phps-mode-parser-sdt-bookkeeping))
;; (message
;; "reference symbol uri: %S from %S + %S, start: %S, end: %S,
object: %S, hit?: %S"
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index 3e77798291..48d1cbdc69 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -131,8 +131,9 @@
"Run test for bookkeeping generation."
(message "-- Running tests for bookkeeping generation... --\n")
- ;; TODO MVP Not bookkeeping for $var->whatever when $var is not $this
;; TODO v2 Should have more delicate handling of isset, !empty condition
blocks
+ ;; TODO v2 bookkeep and include constants in imenu
+ ;; TODO v2 imenu should contain redeclaration of variables
(phps-mode-test-ast--should-bookkeep
"<?php\n\n$var = 'abc';\n\nif ($var2) {\n echo 'This never
happens';\n}\nif ($var) {\n echo 'This happens';\n}"
@@ -217,7 +218,6 @@
'(((7 9) 1) ((15 19) 3) ((25 27) 2) ((32 34) 2) ((37 39) 1) ((41 43) 4)
((49 52) 7) ((58 61) 6) ((69 72) 5) ((77 80) 6) ((83 86) 5) ((89 91) 4) ((102
105) 8) ((110 113) 8) ((115 118) 9) ((144 147) 9) ((152 155) 10) ((165 168) 10)
((174 177) 11) ((182 185) 11) ((191 194) 12) ((199 202) 12) ((207 210) 13)
((215 220) 14) ((225 230) 14))
'(("$y" . 7) ("$fn1" . 15) ("$x" . 25) ("$z" . 41) ("$fn" . 49) ("$x2" .
58) ("$y2" . 69) ("$x3" . 102) ("$x4" . 115) ("$x5" . 152) ("$x6" . 174) ("$x7"
. 191) ("$x8" . 207) ("$rest" . 215)))
- ;; TODO Make this pass for MVP
(phps-mode-test-ast--should-bookkeep
"<?php\n$z = (object) ['name' => 'random', 'doThis' => function() {}];\nif
($z->name) {\n echo 'Hit';\n}\nif ($z->doThis()) {\n echo 'Hit';\n}"
"Bookkeeping ignoring variable properties that is not $this"
- [elpa] externals/phps-mode 8aae220c57 098/135: Started on integrating imenu generation in SDT bookkeeping, (continued)
- [elpa] externals/phps-mode 8aae220c57 098/135: Started on integrating imenu generation in SDT bookkeeping, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 95f563fc70 102/135: Passing bookkeeping tests with integrated imenu generation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode ae516f9e19 105/135: Using separate imenu items for redeclared symbols, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode b21c9f3f3a 107/135: Imenu generation via SDT all tests now passing, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 3332b2bfa9 109/135: Fixes syntax coloring of super-globals, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode bddf800099 111/135: Added failing test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d98f6d78d8 114/135: Saving symbol-table after parse, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 1594c15e9e 117/135: More work on imenu generation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 776c818ff9 121/135: Passing some more imenu tests, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode c6e4844753 122/135: Some byte-compilation fixes, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 96eeff74f8 130/135: Added more todo items for bookkeeping and imenu,
Christian Johansson <=
- [elpa] externals/phps-mode 66ad034207 025/135: SDT member_modifier, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 34a595fa09 028/135: SDT class_const_list, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 1332919417 049/135: Passing another bookkeeping test via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 438ec520fc 051/135: Passing bookkeeping via SDT for conditional assignments, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 7fa721a85d 060/135: More work on bookkeeping static class properties, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 0bf9b31fef 062/135: Passed bookkeeping via SDT for try catch variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 40d7d88fb8 069/135: Work on bookkeeping global variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode a10656fc34 070/135: Passing bookkeeping test for global variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 9c67facc86 075/135: Work on bookkeeping of class static properties, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 39a6fe03ae 079/135: Improved is-varadic and is-reference argument flags, Christian Johansson, 2023/01/29