branch: externals/phps-mode commit d9cbe630b39efcb04ac68764f77996477bb49d33 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Passing bookkeeping of variables inside echo statements --- phps-mode-ast-bookkeeping.el | 6 ++++++ phps-mode-parser-sdt.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/phps-mode-ast-bookkeeping.el b/phps-mode-ast-bookkeeping.el index 41002d560d..4bdbf8fa9b 100644 --- a/phps-mode-ast-bookkeeping.el +++ b/phps-mode-ast-bookkeeping.el @@ -878,6 +878,12 @@ ((equal type 'static-inline-function) (push `(,scope ,(plist-get item 'inline-function)) bookkeeping-stack)) + ((equal type 'echo-statement) + (let ((children (reverse (plist-get item 'children)))) + (dolist (child children) + (when (listp child) + (push `(,scope ,child) bookkeeping-stack))))) + ((equal type 'arrow-function) (let ((sub-scope scope)) (setq arrow-function-count (1+ arrow-function-count)) diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el index a960db1678..0b407724c6 100644 --- a/phps-mode-parser-sdt.el +++ b/phps-mode-parser-sdt.el @@ -199,7 +199,7 @@ (let ((ast-object (list 'ast-type - 'echo + 'echo-statement 'children (phps-mode-parser-sdt--get-list-of-object (nth 1 args))))) ast-object))