branch: externals/phps-mode
commit 8b5ce22d87a28082d6a0b7e65161a7649cc18243
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Fixed issue with SDT for return statement
---
phps-mode-parser-sdt.el | 2 +-
test/phps-mode-test-ast.el | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index 0b407724c6..60dab6ff4c 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -165,7 +165,7 @@
(puthash
149
(lambda(args _terminals)
- `(ast-stype return-statement optional-expr
,(phps-mode-parser-sdt--get-list-of-object (nth 1 args))))
+ `(ast-type return-statement optional-expr
,(phps-mode-parser-sdt--get-list-of-object (nth 1 args))))
phps-mode-parser--table-translations)
;; statement -> (T_GLOBAL global_var_list ";")
diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index ab52402525..ebf832e029 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -347,7 +347,7 @@
(phps-mode-test-ast--should-bookkeep
"<?php\n\nfunction myFunction1()\n{\n return isset($a);\n}\n\nfunction
myFunction2()\n{\n $b = 2;\n if ($b) {\n echo 'Hit';\n }\n
if ($b) {\n echo 'Hit';\n }\n}\n"
"Bookkeeping after definition condition"
- '((" function myFunction2 id $b" 1) ((87 89) 1) ((103 105) 1) ((143 145)
1)))
+ '(((50 52) 0) (" function myFunction2 id $b" 1) ((87 89) 1) ((103 105) 1)
((143 145) 1)))
(phps-mode-test-ast--should-bookkeep
"<?php\n\n$a = array(1, 2, 3);\nforeach ($a as $uri => $page)\n{\n if
(isset($pages)) {\n if ($a) {\n echo 'Hit';\n }\n
if ($uri) {\n echo 'Hit';\n }\n if ($page) {\n
echo 'Hit';\n }\n }\n}\n"