[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode d90b470109 035/212: Fixed bookkeeping of clas
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode d90b470109 035/212: Fixed bookkeeping of class property |
Date: |
Wed, 26 Jan 2022 01:50:21 -0500 (EST) |
branch: externals/phps-mode
commit d90b470109134947b4deb6083521f58650fa5de4
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Fixed bookkeeping of class property
---
phps-mode-ast.el | 89 +++++++++++++++++++++++++++++++++-----------------------
1 file changed, 53 insertions(+), 36 deletions(-)
diff --git a/phps-mode-ast.el b/phps-mode-ast.el
index b3e2dc697c..50576bc242 100644
--- a/phps-mode-ast.el
+++ b/phps-mode-ast.el
@@ -433,9 +433,9 @@
'subject
(nth 2 args)
'start
- (car (cdr (nth 2 terminals)))
+ (car (cdr (car (nth 2 terminals))))
'end
- (cdr (cdr (nth 2 terminals))))))
+ (cdr (cdr (car (nth 2 terminals)))))))
ast-object))
phps-mode-parser--table-translations)
@@ -970,12 +970,7 @@
bookkeeping-stack)))))
((equal type 'namespace)
- (let* ((name (plist-get item 'name))
- (subnamespace
- (format
- "%s namespace %s"
- symbol-namespace
- name)))
+ (let* ((name (plist-get item 'name)))
(when-let ((children (reverse (plist-get item 'children))))
(dolist (child children)
(push
@@ -1212,37 +1207,59 @@
bookkeeping-stack))))))
((equal type 'property)
- (let ((subject (plist-get item 'subject)))
+ (let ((subject (plist-get item 'subject))
+ (static-p))
+ (when-let ((modifiers (plist-get item 'modifiers)))
+ (dolist (modifier modifiers)
+ (when (equal modifier 'static)
+ (setq
+ static-p
+ t))))
(if (stringp subject)
- (let ((id (format
- "%s id %s"
- variable-namespace
- subject))
- (object (list
- (plist-get item 'start)
- (plist-get item 'end)))
- (defined 1))
- ;; (message "id: %S from %S" id item)
- (when-let ((predefined (gethash id bookkeeping)))
+ (let ((id))
+ (if static-p
+ (setq
+ id
+ (format
+ "%s static id %s"
+ variable-namespace
+ subject))
(setq
+ id
+ (format
+ "%s id %s"
+ variable-namespace
+ subject)))
+ (let ((object (list
+ (plist-get item 'start)
+ (plist-get item 'end)))
+ (defined 1))
+ ;; (message "id: %S from %S" id item)
+ (when-let ((predefined (gethash id bookkeeping)))
+ (setq
+ defined
+ (1+ predefined)))
+ (puthash
+ id
defined
- (1+ predefined)))
- (puthash
- id
- defined
- bookkeeping)
- (puthash
- object
- defined
- bookkeeping))
- (push
- (list
- (list
- class
- function
- namespace)
- subject)
- bookkeeping-stack))))
+ bookkeeping)
+ (puthash
+ object
+ defined
+ bookkeeping)))
+ (let ((class-namespace class))
+ (when static-p
+ (setq
+ class-namespace
+ (format "%s static")))
+ (push
+ (list
+ (list
+ class-namespace
+ function
+ namespace)
+ subject)
+ bookkeeping-stack)))))
((equal type 'function_call)
(when-let ((arguments (plist-get item 'argument_list)))
- [elpa] externals/phps-mode edba476df8 191/212: Byte compilation fixes for indentation, (continued)
- [elpa] externals/phps-mode edba476df8 191/212: Byte compilation fixes for indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 580298c395 201/212: Improved indentation of multi-line concatenated strings containing brackets, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3e79319cf5 195/212: Added failing indent test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 72c692b511 210/212: Re-scan buffer interactively now clears cache and kills running threads, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 55d59ee365 207/212: More work on cache support, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 733f36a123 203/212: Added more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d4f0db2c0c 211/212: Added failing bookkeeping test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode cb4d95cd7a 204/212: Passed new indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a907f103f0 026/212: More work on AST for bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 95078e0db2 029/212: Added SDT for increment variable production, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d90b470109 035/212: Fixed bookkeeping of class property,
Christian Johansson <=
- [elpa] externals/phps-mode bcf0c68945 038/212: AST-imenu and AST-bookkeeping now in standalone files, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 4e021b8413 046/212: Bookkeeping via AST now passing method calls, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 712f5e9f2b 049/212: Removed invalid syntax code from old bookkeeping test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1dc3b453c9 043/212: Passed bookkeeping via AST for try catch blocks, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 882e6f75dc 062/212: Work on SDT for interface methods, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 30e9fa14ff 075/212: Added a failing bookkeeping test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 16ce2acfb7 077/212: Removed debug output for bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode bc5039e32f 086/212: Created custom determine string indentation function, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode daff4ad5e0 085/212: More work on indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode b82475c697 090/212: Passed token-blind indentation for multi-line class extends and implements, Christian Johansson, 2022/01/26