[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 6e43f9f6db 037/135: More messing around with
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 6e43f9f6db 037/135: More messing around with SDT |
Date: |
Sun, 29 Jan 2023 03:11:02 -0500 (EST) |
branch: externals/phps-mode
commit 6e43f9f6db88159fe01f371a034c7bc49d1df7bb
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
More messing around with SDT
---
phps-mode-parser-sdt.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index 38c875efc3..779dfff2ed 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -596,6 +596,11 @@
""
"Current bookkeeping namespace.")
+(defvar-local
+ phps-mode-parser-sdt-bookkeeping-symbol-stack
+ nil
+ "Current bookkeeping symbol stack.")
+
;; SDT starts here
;; 0 ((start) (top_statement_list))
@@ -3162,11 +3167,22 @@
359
(lambda(args terminals)
;; TODO Should probably have a expression / statement buffer of mentioned
symbols and do a parse each time a expression / statement reaches its terminus
+ (let ((variable-type (plist-get (nth 0 args) 'ast-type)))
+ (cond
+ ((equal variable-type 'variable-callable-variable)
+ (let* ((callable-variable (plist-get (nth 0 args) 'callable-variable))
+ (callable-variable-type (plist-get callable-variable 'ast-type)))
+ (cond
+ ((equal callable-variable-type 'callable-variable-simple-variable)
+ (let ((callable-variable-simple-variable (plist-get
callable-variable 'simple-variable)))
+ (message "callable-variable-simple-variable: %S"
callable-variable-simple-variable)
+ )))))))
;; TODO Declare variable in bookkeeping and imenu here
(message "expr-assign-variable-by-expr")
(message "args: %S" args)
(message "terminals: %S" terminals)
+ (message "stack: %S" phps-mode-parser-sdt-bookkeeping-symbol-stack)
`(
ast-type
expr-assign-variable-by-expr
@@ -4942,6 +4958,7 @@
`(
ast-type
callable-variable-simple-variable
+ simple-variable
,args))
phps-mode-parser--table-translations)
@@ -5069,6 +5086,12 @@
"%s id %s"
phps-mode-parser-sdt-bookkeeping-namespace
args)))
+ (push
+ (list
+ namespaced-variable
+ (car (cdr terminals))
+ (cdr (cdr terminals)))
+ phps-mode-parser-sdt-bookkeeping-symbol-stack)
;; Bookkeep whether we hit or miss the variable
(if (gethash
- [elpa] externals/phps-mode 42b983bb16 045/135: More work on bookkeeping via SDT, (continued)
- [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, 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 <=
- [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
- [elpa] externals/phps-mode 7dcaa1df9e 034/135: Added SDT rules for all productions, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 258551c02a 035/135: More work on bookkeeping generation via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode e887dc91e3 043/135: Added TODO items, Christian Johansson, 2023/01/29