[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 40d7d88fb8 069/135: Work on bookkeeping globa
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 40d7d88fb8 069/135: Work on bookkeeping global variables |
Date: |
Sun, 29 Jan 2023 03:11:05 -0500 (EST) |
branch: externals/phps-mode
commit 40d7d88fb883c234a2666eb4637f076dbf6b499f
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Work on bookkeeping global variables
---
phps-mode-parser-sdt.el | 68 ++++++++++++++++++++-----------------------------
1 file changed, 28 insertions(+), 40 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index c79fdef75a..6fe350a325 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -752,11 +752,11 @@
(phps-mode-parser-sdt--get-symbol-uri
symbol-name
symbol-scope)))
- ;; (message
- ;; "assign symbol uri: %S from %S + %S"
- ;; symbol-uri
- ;; symbol-name
- ;; symbol-scope)
+ (message
+ "assign symbol uri: %S from %S + %S"
+ symbol-uri
+ symbol-name
+ symbol-scope)
(if (gethash symbol-uri phps-mode-parser-sdt-bookkeeping)
(puthash
symbol-uri
@@ -788,44 +788,37 @@
(symbol-uri
(phps-mode-parser-sdt--get-symbol-uri
symbol-name
- symbol-scope)))
- ;; (message
- ;; "reference symbol uri: %S from %S + %S"
- ;; symbol-uri
- ;; symbol-name
- ;; symbol-scope)
+ symbol-scope))
+ (symbol-hit 0))
(cond
;; Super-global variable
((gethash
symbol-name
phps-mode-parser-sdt--bookkeeping--superglobal-variable-p)
- (puthash
- (list
- symbol-start
- symbol-end)
- 1
- phps-mode-parser-sdt-bookkeeping))
+ (setq symbol-hit 1))
;; Declared variable
((gethash
symbol-uri
phps-mode-parser-sdt-bookkeeping)
- (puthash
- (list
- symbol-start
- symbol-end)
- 1
- phps-mode-parser-sdt-bookkeeping))
-
- ;; Undeclared variable
- (t
- (puthash
- (list
- symbol-start
- symbol-end)
- 0
- phps-mode-parser-sdt-bookkeeping)))))
+ (setq symbol-hit 1)))
+
+ (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, hit?: %S"
+ symbol-uri
+ symbol-name
+ symbol-scope
+ symbol-start
+ symbol-end
+ symbol-hit)))
(setq
phps-mode-parser-sdt--bookkeeping-symbol-stack
nil)))
@@ -1699,6 +1692,8 @@
(puthash
155
(lambda(args _terminals)
+ (dolist (stack-item phps-mode-parser-sdt--bookkeeping-symbol-stack)
+ (push '(global) (nth 1 stack-item)))
(let ((global-var-list (nth 1 args)))
(dolist (global-var global-var-list)
(let ((global-var-type (plist-get global-var 'ast-type)))
@@ -1713,14 +1708,7 @@
phps-mode-parser-sdt--bookkeeping-namespace
variable-start
variable-end)
- phps-mode-parser-sdt--bookkeeping-symbol-assignment-stack)
- (push
- (list
- variable-name
- '((global))
- variable-start
- variable-end)
- phps-mode-parser-sdt--bookkeeping-symbol-stack)))))))
+ phps-mode-parser-sdt--bookkeeping-symbol-assignment-stack)))))))
`(
ast-type
global-statement
- [elpa] externals/phps-mode 1594c15e9e 117/135: More work on imenu generation, (continued)
- [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, 2023/01/29
- [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 <=
- [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
- [elpa] externals/phps-mode e8a5dbe153 126/135: Fix for trait and interface imenu, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 579034d1c6 127/135: Passing imenu test via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode fb9a181135 088/135: Passed more bookkeeping tsts, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode e6bc401d0b 068/135: Work on improving test for global variable bookkeeping, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 4949daefd9 101/135: Passing another SDT imenu test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode c0c37bafd9 110/135: Added some TODO items, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 76ef8cceac 124/135: More fixes in code, Christian Johansson, 2023/01/29