[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 9a45a530d0 100/135: Passing more imenu tests
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 9a45a530d0 100/135: Passing more imenu tests |
Date: |
Sun, 29 Jan 2023 03:11:08 -0500 (EST) |
branch: externals/phps-mode
commit 9a45a530d01201720dd6340a4fc1133b2fd3a589
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Passing more imenu tests
---
phps-mode-ast.el | 1 +
test/phps-mode-test-ast.el | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/phps-mode-ast.el b/phps-mode-ast.el
index 668fd3f9b6..f38af310d2 100644
--- a/phps-mode-ast.el
+++ b/phps-mode-ast.el
@@ -69,6 +69,7 @@
(message "\nTranslation:\n%S\n\n" translation)
+ ;; TODO Should sort this by position
(setq
phps-mode-parser-sdt-symbol-imenu
(nreverse phps-mode-parser-sdt-symbol-imenu))
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index 38ec7d2925..b7bee26e20 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -156,12 +156,13 @@
(phps-mode-test-ast--should-bookkeep
"<?php\n\n// Super-globals\n\nif ($_GET) {\n echo 'Hit';\n}\nif ($_POST)
{\n echo 'Hit';\n}\nif ($_COOKIE) {\n echo 'Hit';\n}\nif ($_SESSION) {\n
echo 'Hit';\n}\nif ($_REQUEST) {\n echo 'Hit';\n}\nif ($GLOBALS) {\n
echo 'Hit';\n}\nif ($_SERVER) {\n echo 'Hit';\n}\nif ($_FILES) {\n echo
'Hit';\n}\nif ($_ENV) {\n echo 'Hit';\n}\nif ($argc) {\n echo
'Hit';\n}\nif ($argv) {\n echo 'Hit';\n}\nif ($http_​response_​header) {\n
echo 'Hit';\n}"
"Bookkeeping of super-globals"
- '(((30 35) 1) ((61 67) 1) ((93 101) 1) ((127 136) 1) ((162 171) 1) ((197
205) 1) ((231 239) 1) ((265 272) 1) ((298 303) 1) ((329 334) 1) ((360 365) 1)
((391 414) 1)))
+ '(((30 35) -1) ((61 67) -1) ((93 101) -1) ((127 136) -1) ((162 171) -1)
((197 205) -1) ((231 239) -1) ((265 272) -1) ((298 303) -1) ((329 334) -1)
((360 365) -1) ((391 414) -1)))
(phps-mode-test-ast--should-bookkeep
"<?php\n\nnamespace myNamespaceA {\n $var = 123;\n class myClassA {\n
private $var2 = 123;\n public static function myFunctionA($var3)
{\n $var4 = 123;\n if ($var) {\n echo
'Miss';\n }\n if ($var2) {\n echo
'Miss';\n }\n if ($var3) {\n echo 'Hit';\n
}\n if ($var4) {\n echo 'Hit';\n
}\n }\n\n fun [...]
"Bookkeeping in maximum level with namespaces, classes and functions."
- '((" namespace myNamespaceA id $var" ((37 41))) ((37 41) 1) (" namespace
myNamespaceA class myClassA function myFunctionB id $var5" ((485 490))) ("
namespace myNamespaceA class myClassA function myFunctionB id $this" ((500
941))) (" namespace myNamespaceA class myClassA function myFunctionB id $var6"
((514 519))) (" namespace myNamespaceA class myClassA function myFunctionA id
$var3" ((142 147))) (" namespace myNamespaceA class myClassA function
myFunctionA id $var4" ((163 168))) (" n [...]
+ '(((37 41) 1) ((485 490) 2) ((881 886) 4) ((814 819) 2) ((746 751) 0) ((678
683) 0) ((610 615) 0) ((543 547) 0) ((514 519) 4) ((142 147) 5) ((394 399) 6)
((327 332) 5) ((259 264) 0) ((192 196) 0) ((163 168) 6) ((86 91) 7) ((957 961)
1) ((999 1004) 0) ((1043 1048) 0) ((1087 1092) 0) ((1131 1136) 0) ((1175 1180)
0) ((1243 1248) 8) ((2088 2094) 9) ((2894 2900) 9) ((2826 2832) 11) ((2757
2763) 0) ((2689 2694) 0) ((2621 2626) 0) ((2553 2558) 0) ((2486 2491) 0) ((2419
2424) 0) ((2351 2356) [...]
+ '(("namespace myNamespaceA id $var" . 37) ("namespace myNamespaceAclass
myClassAfunction myFunctionB id $var5" . 485) ("namespace myNamespaceAclass
myClassAfunction myFunctionB id $this" . 500) ("namespace myNamespaceAclass
myClassAfunction myFunctionB id $var6" . 514) ("namespace myNamespaceAclass
myClassAfunction myFunctionA id $var3" . 142) ("namespace myNamespaceAclass
myClassAfunction myFunctionA id $var4" . 163) ("namespace myNamespaceAclass
myClassA id $var2" . 86) ("namespace [...]
(phps-mode-test-ast--should-bookkeep
"<?php\n\n// Conditional assignments\n\n$items = array(1, 2, 3);\nforeach
($items as $item) {\n if ($item) {\n echo 'Hit';\n }\n}\nforeach
($items as $key => $value) {\n if ($key || $value) {\n echo 'Hit';\n
}\n}\nfor ($i = 0; $i < count($items); $i++) {\n if ($i) {\n echo
'Hit';\n }\n}\nif ($a = 123) {\n if ($a) {\n echo 'Hit';\n
}\n}\nwhile ($b = 123) {\n if ($a) {\n echo 'Hit';\n }\n}\ndo {\n
echo 'Hit';\n} while ( [...]
- [elpa] externals/phps-mode 0ca63fe2b6 041/135: Passing another bookkeeping test via SDT, (continued)
- [elpa] externals/phps-mode 0ca63fe2b6 041/135: Passing another bookkeeping test via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode e74d0fd634 010/135: SDT for inner_statement, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 8dc2235f17 017/135: Added SDT for if_stmt, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d73af7968e 033/135: SDT to 538, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 0e8923c0bd 042/135: Passed super-globals bookkeeping test via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode cc584ff4d6 061/135: Bookkeping of static class properties test passing, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode eefe70b999 072/135: Work on improving symbol URI calculation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode ebe28c3c9d 073/135: Work on improving symbol URI generation for class method variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 61d3e7b1e0 093/135: Passing bookkeeping test but via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d16c8a4e93 099/135: Passing some tests now with integrated bookkeeping and imenu-generation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 9a45a530d0 100/135: Passing more imenu tests,
Christian Johansson <=
- [elpa] externals/phps-mode 749659769c 115/135: More work on imenu generation via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 42b983bb16 045/135: More work on bookkeeping via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode cba467b26c 050/135: Added TODO items, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode e1752a3aa3 064/135: Bookkeeping of variables inside simple anonymous functions, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d464cb1f01 077/135: Fixed bookkeeping of global variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 1a1245f186 082/135: Passing bookkeeping test isset and empty variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 696d66d7e7 085/135: Bookkeeping of static variable inside function, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode cffad0d620 131/135: Merge branch 'feature/full-sdt', Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 249f8a2a4d 087/135: Work on bookkeeping class static variable, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 177b00f06a 132/135: Updated copyright years, Christian Johansson, 2023/01/29