[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 69341c9709 039/212: More working on bookkeepi
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 69341c9709 039/212: More working on bookkeeping of class properties via parser SDT |
Date: |
Wed, 26 Jan 2022 01:50:21 -0500 (EST) |
branch: externals/phps-mode
commit 69341c9709039cd730a39995543f73c7adc1be7b
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
More working on bookkeeping of class properties via parser SDT
---
phps-mode-ast-bookkeeping.el | 51 ++++++++++++++++++++++++++++++++------------
phps-mode-parser-sdt.el | 8 +++++--
2 files changed, 43 insertions(+), 16 deletions(-)
diff --git a/phps-mode-ast-bookkeeping.el b/phps-mode-ast-bookkeeping.el
index 72437dcef3..b695406d00 100644
--- a/phps-mode-ast-bookkeeping.el
+++ b/phps-mode-ast-bookkeeping.el
@@ -557,24 +557,47 @@
((equal type 'array-object-dereferencable)
(let* ((subject (plist-get item 'subject))
(property-name (plist-get item 'property))
- (downcase-subject-name (downcase (plist-get subject
'name))))
+ (downcase-subject-name (downcase (plist-get subject 'name)))
+ (property-name (plist-get item 'property-name)))
(cond
((string= downcase-subject-name "$this")
- (let ((sub-variable-namespace
- (phps-mode-ast-bookkeeping--generate-variable-namespace
- namespace
- nil
- function))
- (sub-symbol-namespace
- (phps-mode-ast-bookkeeping--generate-variable-namespace
- namespace
- nil
- function)))
- ;; TODO Check bookkeeping here
- ;; (gethash id bookkeeping)
- ))
+ (let* ((sub-variable-namespace
+ (phps-mode-ast-bookkeeping--generate-variable-namespace
+ namespace
+ nil
+ function))
+ (variable-id
+ (format
+ "%s id $%s"
+ sub-variable-namespace
+ property-name))
+ (sub-symbol-namespace
+ (phps-mode-ast-bookkeeping--generate-variable-namespace
+ namespace
+ nil
+ function))
+ (symbol-id
+ (format
+ "%s id %s"
+ sub-variable-namespace
+ property-name))
+ (bookkeeping-object
+ (list
+ (plist-get item 'property-start)
+ (plist-get item 'property-end))))
+ (if (or
+ (gethash variable-id bookkeeping)
+ (gethash symbol-id bookkeeping))
+ (puthash
+ bookkeeping-object
+ t
+ bookkeeping)
+ (puthash
+ bookkeeping-object
+ nil
+ bookkeeping))))
)))
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index 08ec076dc4..060e337288 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -600,7 +600,7 @@
;; 490: variable -> (array_object_dereferencable T_OBJECT_OPERATOR
property_name)
(puthash
490
- (lambda(args _terminals)
+ (lambda(args terminals)
(let ((ast-object
(list
'ast-type
@@ -608,7 +608,11 @@
'subject
(nth 0 args)
'property-name
- (nth 2 args))))
+ (nth 2 args)
+ 'property-start
+ (car (cdr (nth 2 terminals)))
+ 'property-end
+ (cdr (cdr (nth 2 terminals))))))
ast-object))
phps-mode-parser--table-translations)
- [elpa] externals/phps-mode 4e5be4f8f8 112/212: More indentation work for mixed PHP/HTML content, (continued)
- [elpa] externals/phps-mode 4e5be4f8f8 112/212: More indentation work for mixed PHP/HTML content, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode ff62626f48 110/212: Passing indent test for square bracket array, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 50d006852c 129/212: Fixed issue with indent being dependent on position of point on current line, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3de8eff9f1 114/212: More wrestling with indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d3b5a85b70 001/212: Using property list as basis for AST, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a80c12ef14 005/212: Passing imenu-generation for file with multiple namespaces, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 0071b40aae 007/212: Syntax coloring is now in separate file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1cc4aed616 016/212: Passing first bookkeeping test via generation via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode b3b27951bd 015/212: More work on bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 395a4ed045 036/212: Started on bookkeeping via parser SDT for properties, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 69341c9709 039/212: More working on bookkeeping of class properties via parser SDT,
Christian Johansson <=
- [elpa] externals/phps-mode cefab36fa8 054/212: More work on bookkeeping arrow function variables, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d9cbe630b3 068/212: Passing bookkeeping of variables inside echo statements, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 0919855a31 073/212: Added SDT for concat operation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 5df554fc47 070/212: Bookkeeping via AST properly handles $this reference in only non-static methods, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2432928a86 096/212: Indentation passing more tests for alternative control structures, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode cef879268b 103/212: Added two new tests for failing indentation for multi-line concatenated strings, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 40ce934c11 116/212: Indent support for string-doc in assignment, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode fbe600500f 135/212: More work on array and argument element indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 6cb18913e4 152/212: Improved indentation for lines ending with closing bracket and comma, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 26d7b64086 144/212: Added TODO item for indentation, Christian Johansson, 2022/01/26