[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode a8fecdfd68 055/212: Bookkeeping of variables
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode a8fecdfd68 055/212: Bookkeeping of variables inside arrow functions now working |
Date: |
Wed, 26 Jan 2022 01:50:42 -0500 (EST) |
branch: externals/phps-mode
commit a8fecdfd684574dced52b908e3b3daf90dc718e0
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Bookkeeping of variables inside arrow functions now working
---
phps-mode-ast-bookkeeping.el | 11 +++++++----
test/phps-mode-test-ast.el | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/phps-mode-ast-bookkeeping.el b/phps-mode-ast-bookkeeping.el
index f2417c89ac..2c67e324bb 100644
--- a/phps-mode-ast-bookkeeping.el
+++ b/phps-mode-ast-bookkeeping.el
@@ -236,7 +236,8 @@
(let ((ids
(phps-mode-ast-bookkeeping--generate-variable-scope-string
scope
- (plist-get item 'name)))
+ (plist-get item 'name)
+ t))
(object
(list
(plist-get item 'start)
@@ -534,7 +535,7 @@
(plist-get item 'start)
(plist-get item 'end)))
(defined 1))
- ;; (message "id: %S from %S" id item)
+ ;; (message "ids: %S from %S" ids item)
(dolist (id ids)
(when-let ((predefined (gethash id bookkeeping)))
(setq
@@ -613,7 +614,8 @@
(variable-ids
(phps-mode-ast-bookkeeping--generate-variable-scope-string
sub-scope
- (concat "$" property-name)))
+ (concat "$" property-name)
+ t))
(symbol-id
(phps-mode-ast-bookkeeping--generate-symbol-scope-string
sub-scope
@@ -664,7 +666,8 @@
(variable-ids
(phps-mode-ast-bookkeeping--generate-variable-scope-string
sub-scope
- (plist-get member 'name)))
+ (plist-get member 'name)
+ t))
(bookkeeping-object
(list
(plist-get member 'start)
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index a3447172ac..9cf9250dce 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -537,7 +537,7 @@
(should
(equal
(phps-mode-test--hash-to-list phps-mode-ast-bookkeeping--index t)
- '((" id $y" 1) ((7 9) 1) (" id $fn1" 1) ((15 19) 1) (" arrow function 1
id $x" 1) ((25 27) 1) ((32 34) 1) ((37 39) 1) (" id $z" 1) ((41 43) 1) (" id
$fn" 1) ((49 52) 1) (" arrow function 2 id $x2" 1) ((58 61) 1) (" arrow
function 2 arrow function 3 id $y2" 1) ((69 72) 1) ((77 80) 1) ((83 86) 1) ((89
91) 1) (" arrow function 3 id $x3" 1) ((102 105) 1) ((110 113) 1) (" id $x4" 1)
((115 118) 1) ((144 147) 1) (" arrow function 6 id $x5" 1) ((152 155) 1) ((165
168) 1) (" arrow function [...]
+ '((" id $y" 1) ((7 9) 1) (" id $fn1" 1) ((15 19) 1) (" arrow function 1
id $x" 1) ((25 27) 1) ((32 34) 1) ((37 39) 1) (" id $z" 1) ((41 43) 1) (" id
$fn" 1) ((49 52) 1) (" arrow function 2 id $x2" 1) ((58 61) 1) (" arrow
function 2 arrow function 3 id $y2" 1) ((69 72) 1) ((77 80) 1) ((83 86) 1) ((89
91) 1) (" arrow function 4 id $x3" 1) ((102 105) 1) ((110 113) 1) (" id $x4" 1)
((115 118) 1) ((144 147) 1) (" arrow function 6 id $x5" 1) ((152 155) 1) ((165
168) 1) (" arrow function [...]
(phps-mode-test-ast--buffer-contents
"<?php\n$z = (object) array('name' => 'random');\nif ($z->name) {\n echo
'Hit';\n}"
- [elpa] externals/phps-mode df0b707a61 044/212: Added parser SDT for inline-function, (continued)
- [elpa] externals/phps-mode df0b707a61 044/212: Added parser SDT for inline-function, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 432382eddb 051/212: Added bookkeeping support for global variables in functions, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode bb381d8127 041/212: Bookkeeping of class properties via AST passed test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode e95df1027b 042/212: Reverted old tests for imenu and bookkeeping for lex-analyzer, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a65c8af308 008/212: Extract ast code into separate file and test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 23c001c33f 037/212: Moved parser SDT to separate file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 261121f096 056/212: Fixed incorrect information in debug output in test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode e8a47de694 052/212: Work on supported arrow functions for bookkeeping via AST, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 5686703a6b 074/212: Passing bookkeeping via AST for $this inside arrow function body inside class method, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a9d0e941df 066/212: Started on SDT for static variables statement, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a8fecdfd68 055/212: Bookkeeping of variables inside arrow functions now working,
Christian Johansson <=
- [elpa] externals/phps-mode e42646dc3a 058/212: Added SDT for isset() and empty(), Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 9ad46d061e 057/212: Bookkeeping via AST passing two more tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 806bb902b3 122/212: Improved indentation for chaining objects, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode cc3bf03786 123/212: Improved indentation after ending assignment expression, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3162dca5c4 159/212: Added two more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1e44021653 163/212: Added more failing indent tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode e7aff3f69d 157/212: Passed more indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode db7121941c 156/212: Passing indention on line after not equals condition, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d072fe5315 136/212: Improved indentation around array elements, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode f880ba2d62 164/212: Improved indentation on lines after assignment that ends with closing bracket, Christian Johansson, 2022/01/26