[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode d464cb1f01 077/135: Fixed bookkeeping of glob
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode d464cb1f01 077/135: Fixed bookkeeping of global variables |
Date: |
Sun, 29 Jan 2023 03:11:06 -0500 (EST) |
branch: externals/phps-mode
commit d464cb1f01f745e324c5ffc25e2b109397a73be3
Author: christian <christian@cvj.se>
Commit: christian <christian@cvj.se>
Fixed bookkeeping of global variables
---
phps-mode-parser-sdt.el | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index 307086b390..faab16fd49 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -640,6 +640,7 @@
(let ((item (nth scope-index scope))
(next-scope)
(next-scope-type)
+ (next-scope-is-global)
(next-scope-is-this-object-operator)
(next-scope-is-self-static-member-operator))
@@ -649,6 +650,8 @@
(setq next-scope (nth (1+ scope-index) scope))
(setq next-scope-type (car next-scope))
(cond
+ ((equal next-scope-type 'global)
+ (setq next-scope-is-global t))
((equal next-scope-type 'object-operator)
(let ((downcased-scope-name (downcase (car (cdr
next-scope)))))
(when (string= downcased-scope-name "$this")
@@ -673,7 +676,9 @@
(space-name (car (cdr item))))
(cond
- ((equal space-type 'namespace)
+ ((and
+ (equal space-type 'namespace)
+ (not next-scope-is-global))
(let ((potential-uri-count (length potential-uris))
(potential-uri-index 0))
(while (< potential-uri-index potential-uri-count)
@@ -682,7 +687,9 @@
(format " namespace %s%s" space-name (nth
potential-uri-index potential-uris)))
(setq potential-uri-index (1+ potential-uri-index)))))
- ((equal space-type 'class)
+ ((and
+ (equal space-type 'class)
+ (not next-scope-is-global))
(let ((potential-uri-count (length potential-uris))
(potential-uri-index 0))
(while (< potential-uri-index potential-uri-count)
@@ -691,7 +698,9 @@
(format " class %s%s" space-name (nth
potential-uri-index potential-uris)))
(setq potential-uri-index (1+ potential-uri-index)))))
- ((equal space-type 'interface)
+ ((and
+ (equal space-type 'interface)
+ (not next-scope-is-global))
(let ((potential-uri-count (length potential-uris))
(potential-uri-index 0))
(while (< potential-uri-index potential-uri-count)
@@ -700,7 +709,9 @@
(format " interface %s%s" space-name (nth
potential-uri-index potential-uris)))
(setq potential-uri-index (1+ potential-uri-index)))))
- ((equal space-type 'trait)
+ ((and
+ (equal space-type 'trait)
+ (not next-scope-is-global))
(let ((potential-uri-count (length potential-uris))
(potential-uri-index 0))
(while (< potential-uri-index potential-uri-count)
@@ -712,6 +723,7 @@
((and
(equal space-type 'function)
(not (or
+ next-scope-is-global
next-scope-is-this-object-operator
next-scope-is-self-static-member-operator)))
(let ((potential-uri-count (length potential-uris))
- [elpa] externals/phps-mode cc584ff4d6 061/135: Bookkeping of static class properties test passing, (continued)
- [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, 2023/01/29
- [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 <=
- [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
- [elpa] externals/phps-mode 0654fe8899 134/135: Updated documentation, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6e43f9f6db 037/135: More messing around with SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 86ad9e35ee 047/135: Renamed symbol id to symbol URI, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode dbaf508512 052/135: Work on getting bookkeeping for class properties working, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 531c98cf2b 053/135: Improved bookkeeping of class properties, Christian Johansson, 2023/01/29