[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 1afe6aaec7 086/135: Passing more tests for st
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 1afe6aaec7 086/135: Passing more tests for static variables |
Date: |
Sun, 29 Jan 2023 03:11:07 -0500 (EST) |
branch: externals/phps-mode
commit 1afe6aaec767f48da0a156f675c0964770c6d079
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Passing more tests for static variables
---
phps-mode-parser-sdt.el | 9 ++++++++-
test/phps-mode-test-ast.el | 6 +++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index ddb9bea944..ac09147928 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -1800,7 +1800,14 @@
phps-mode-parser-sdt--bookkeeping-namespace
variable-start
variable-end)
- phps-mode-parser-sdt--bookkeeping-symbol-assignment-stack)))))))
+ phps-mode-parser-sdt--bookkeeping-symbol-assignment-stack)
+ (push
+ (list
+ variable-name
+ phps-mode-parser-sdt--bookkeeping-namespace
+ variable-start
+ variable-end)
+ phps-mode-parser-sdt--bookkeeping-symbol-stack)))))))
`(
ast-type
static-statement
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index 4dde441bb1..7c0e498711 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -331,17 +331,17 @@
(phps-mode-test-ast--should-bookkeep
"<?php\n\n$var = 123;\n\nfunction test($abc) {\n static $var;\n if
($var) {\n echo 'Hit';\n }\n}"
"Bookkeeping of static variable declaration in function"
- '((" id $var" ((8 12))) ((8 12) 1) (" function test id $abc" ((35 39))) ("
function test id $var" ((54 58))) ((35 39) 1) ((68 72) 1)))
+ '((" id $var" ((8 12))) ((8 12) 1) (" function test id $abc" ((35 39))) ("
function test id $var" ((54 58))) ((35 39) 1) ((68 72) 1) ((54 58) 1)))
(phps-mode-test-ast--should-bookkeep
"<?php\n\nglobal $a, $b;\n\nif ($a) {\n echo 'Hit';\n}\n\nfunction
myFunction($c)\n{\n global $a;\n if ($a) {\n echo 'Hit';\n }\n
if ($b) {\n echo 'Miss';\n }\n}\n"
"Bookkeeping of global variables in functional-oriented file"
- '((" id $a" 1) ((15 17) 1) (" id $b" 1) ((19 21) 1) ((28 30) 1) (" function
myFunction id $c" 1) ((73 75) 1) (" function myFunction id $a" 1) ((90 92) 1)
((102 104) 1) ((142 144) 0)))
+ '((" id $b" ((19 21))) (" id $a" ((15 17))) ((19 21) 1) ((15 17) 1) ((28
30) 1) (" function myFunction id $c" ((73 75))) (" function myFunction id $a"
((90 92))) ((73 75) 1) ((142 144) 0) ((102 104) 1) ((90 92) 1)))
(phps-mode-test-ast--should-bookkeep
"<?php\n\nstatic $a;\n\nif ($a) {}\n\nfunction test()\n{\n static $a;\n
if ($a) {}\n}\n\nclass There\n{\n function here()\n {\n static
$a;\n if ($a) {}\n }\n}"
"Bookkeeping of static variables in different scopes without namespaces"
- '((" id $a" 1) ((15 17) 1) ((24 26) 1) (" function test id $a" 1) ((61 63)
1) ((73 75) 1) (" class There function here id $this" 1) (" class There
function here id $a" 1) ((138 140) 1) ((154 156) 1)))
+ '((" 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)))
(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 [...]
- [elpa] externals/phps-mode 76ef8cceac 124/135: More fixes in code, (continued)
- [elpa] externals/phps-mode 76ef8cceac 124/135: More fixes in code, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 3b6eb46d4c 129/135: Added new MVP bookkeeping and imenu test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f9ddef260c 039/135: Passing first bookkeeping test using SDT generated bookkeeping, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode fb42b49970 044/135: Added more TODO items, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode dd2fadefe7 048/135: Bookkeeping class properties, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 804a0dbdb9 074/135: Added static uri for symbol names, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 7bb676dc8b 076/135: Bookkeeping for anonymous function passing, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f86d8dc6ac 078/135: More work on arrow function variable uri, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 787aaa2bb4 081/135: Passing another bookkeeping test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 66c02b9be1 083/135: Passing test for bookkeeping of interface variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 1afe6aaec7 086/135: Passing more tests for static variables,
Christian Johansson <=
- [elpa] externals/phps-mode d456658676 089/135: Passing bookkeeping test for $this inside arrow function, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f4be94ccfc 094/135: Passing bookkeeping test for class properties inside conditional expression, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 18f1f12fc6 096/135: Added new bookkeeping test for class parameters in constructor method, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6d3cadbdf0 104/135: More integration of new imenu and bookkeeping via SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 171e96b043 123/135: Fixes for some tests, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6944154fd3 125/135: Imenu via SDT passing some more tests, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode d1b1fd0a19 071/135: Started bookkeeping of arrow function variables, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode ae68e19c0a 080/135: Passing bookkeeping arrow function, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f053587ff6 091/135: Passing another bookkeeping test, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 9c43bc30c4 103/135: Removed old bookkeeping and imenu and integrated new via SDT, Christian Johansson, 2023/01/29