[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 249f8a2a4d 087/135: Work on bookkeeping class
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 249f8a2a4d 087/135: Work on bookkeeping class static variable |
Date: |
Sun, 29 Jan 2023 03:11:07 -0500 (EST) |
branch: externals/phps-mode
commit 249f8a2a4d04b46dfec69a937e7e28b4dcfd687a
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Work on bookkeeping class static variable
---
phps-mode-parser-sdt.el | 14 +++++++++-----
test/phps-mode-test-ast.el | 2 ++
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index ac09147928..991e3068ba 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -6218,10 +6218,6 @@
(symbol-end
(cdr (cdr terminals)))
(namespace phps-mode-parser-sdt--bookkeeping-namespace))
- (when phps-mode-parser-sdt--bookkeeping-namespace-stack
- (setq
- namespace
- (pop phps-mode-parser-sdt--bookkeeping-namespace-stack)))
(push
(list
symbol-name
@@ -6277,7 +6273,15 @@
(let ((class-name-string (plist-get class-name 'name))
(namespace phps-mode-parser-sdt--bookkeeping-namespace))
(push (list 'static-member class-name-string) namespace)
- (push namespace phps-mode-parser-sdt--bookkeeping-namespace-stack)))))
+ (setf
+ (nth 1 (car phps-mode-parser-sdt--bookkeeping-symbol-stack))
+ namespace)))
+ ((equal class-name-type 'class-name-static)
+ (let ((namespace phps-mode-parser-sdt--bookkeeping-namespace))
+ (push (list 'static-member "static") namespace)
+ (setf
+ (nth 1 (car phps-mode-parser-sdt--bookkeeping-symbol-stack))
+ namespace)))))
`(
ast-type
static-member-class-name
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index 7c0e498711..840add33be 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -343,6 +343,8 @@
"Bookkeeping of static variables in different scopes without namespaces"
'((" id $a" ((15 17))) ((15 17) 1) ((24 26) 1) (" function test id $a" ((61
63))) ((73 75) 1) ((61 63) 1) (" class There function here id $this" ((121
166))) (" class There function here id $a" ((138 140))) ((154 156) 1) ((138
140) 1)))
+ ;; TODO WAS HERE
+
(phps-mode-test-ast--should-bookkeep
"<?php\nclass There\n{\n private $variable;\n private \\My\\Random
$variable2;\n private string $variable3;\n private static $variable4;\n
private static \\My\\Random $variable5;\n private static string
$variable6;\n function here()\n {\n if ($this->variable) {}\n
if ($this->variable2) {}\n if ($this->variable3) {}\n if
($this->variable4) {}\n if (self::$variable4) {}\n if
(self::$variable5) {}\n if (self::$varia [...]
"Bookkeeping of typed class variables"
- [elpa] externals/phps-mode d16c8a4e93 099/135: Passing some tests now with integrated bookkeeping and imenu-generation, (continued)
- [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, 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 <=
- [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
- [elpa] externals/phps-mode 5080effb1d 014/135: Added TODO item, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode cfcb795473 016/135: SDT for while_statement, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 38ccb4e728 019/135: More SDT for argument and union_type and intersection_type, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 7602348327 031/135: More SDT rules, Christian Johansson, 2023/01/29