[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 685375c 31/62: Passing all unit tests after u
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 685375c 31/62: Passing all unit tests after updated lex-analyzer |
Date: |
Tue, 20 Apr 2021 10:56:18 -0400 (EDT) |
branch: externals/phps-mode
commit 685375c3f0abc87a0cede689aa9efae274539d3f
Author: Christian Johansson <christian@mediastrategi.se>
Commit: Christian Johansson <christian@mediastrategi.se>
Passing all unit tests after updated lex-analyzer
---
phps-mode-lex-analyzer.el | 8 +++++---
phps-mode-lexer.el | 2 +-
test/phps-mode-test-lex-analyzer.el | 7 ++++---
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 13867bb..2fc683e 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -1706,9 +1706,11 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
(setq imenu-namespace-index '())
(setq imenu-in-namespace-declaration nil))
- ((and (or (equal token 'T_NAME_RELATIVE)
- (equal token 'T_NAME_FULLY_QUALIFIED)
- (equal token 'T_NAME_QUALIFIED))
+ ((and (or
+ (equal token 'T_STRING)
+ (equal token 'T_NAME_RELATIVE)
+ (equal token 'T_NAME_FULLY_QUALIFIED)
+ (equal token 'T_NAME_QUALIFIED))
(setq
imenu-in-namespace-name
(concat
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 6d4fd71..e5cdb04 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -1070,7 +1070,7 @@
(looking-at (concat phps-mode-lexer--label "[\\[}]")))
(let* ((start (match-beginning 0))
(end (1- (match-end 0)))
- (data (buffer-substring-no-properties start end)))
+ (_data (buffer-substring-no-properties start end)))
(phps-mode-lexer--yyless 1)
(phps-mode-lexer--yy-pop-state)
(phps-mode-lexer--yy-push-state 'ST_IN_SCRIPTING)
diff --git a/test/phps-mode-test-lex-analyzer.el
b/test/phps-mode-test-lex-analyzer.el
index 677ba4f..64af009 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -1414,9 +1414,10 @@
(phps-mode-test--with-buffer
"<?php\n\nnamespace myNamespaceA {\n $var = 123;\n class myClassA {\n
private $var2 = 123;\n function myFunctionA($var3) {\n
$var4 = 123;\n if ($var) {\n echo 'Miss';\n
}\n if ($var2) {\n echo 'Miss';\n }\n
if ($var3) {\n echo 'Hit';\n }\n if
($var4) {\n echo 'Hit';\n }\n }\n\n
function myFuncti [...]
"Bookkeeping in maximum level with namespaces, classes and functions."
- (should (equal
- (phps-mode-test--hash-to-list
(phps-mode-lex-analyzer--get-bookkeeping) 1)
- (list (list " id $var" 1) (list (list 37 41) 1) (list " namespace
myNamespaceA class myClassA id $var2" 1) (list (list 86 91) 1) (list "
namespace myNamespaceA class myClassA function myFunctionA id $this" 1) (list "
namespace myNamespaceA class myClassA function myFunctionA id $var3" 1) (list
(list 128 133) 1) (list " namespace myNamespaceA class myClassA function
myFunctionA id $var4" 1) (list (list 149 154) 1) (list (list 178 182) 0) (list
(list 245 250) 0) (list (list 313 [...]
+ (should
+ (equal
+ (phps-mode-test--hash-to-list (phps-mode-lex-analyzer--get-bookkeeping) 1)
+ (list (list " id $var" 1) (list (list 37 41) 1) (list " namespace
myNamespaceA class myClassA id $var2" 1) (list (list 86 91) 1) (list "
namespace myNamespaceA class myClassA function myFunctionA id $this" 1) (list "
namespace myNamespaceA class myClassA function myFunctionA id $var3" 1) (list
(list 128 133) 1) (list " namespace myNamespaceA class myClassA function
myFunctionA id $var4" 1) (list (list 149 154) 1) (list (list 178 182) 0) (list
(list 245 250) 0) (list (list 313 318) 1 [...]
(phps-mode-test--with-buffer
"<?php\n\n// Conditional assignments\n\n$items = array(1, 2, 3);\nforeach
($items as $item) {\n if ($item) {\n echo 'Hit';\n }\n}\nforeach
($items as $key => $value) {\n if ($key || $value) {\n echo 'Hit';\n
}\n}\nfor ($i = 0; $i < count($items); $i++) {\n if ($i) {\n echo
'Hit';\n }\n}\nif ($a = 123) {\n if ($a) {\n echo 'Hit';\n
}\n}\nwhile ($b = 123) {\n if ($a) {\n echo 'Hit';\n }\n}\ndo {\n
echo 'Hit';\n} while ( [...]
- [elpa] externals/phps-mode 804a42e 09/62: Most of lex analyzer implemented, (continued)
- [elpa] externals/phps-mode 804a42e 09/62: Most of lex analyzer implemented, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 1072b2d 14/62: Improved debugging of lex-analyzer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 9c63f7d 16/62: Passed first old tests for lexer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode e624011 19/62: White-space fixes for lexer unit tests, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode d893f7f 22/62: Passing some more tests, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode c1ab121 25/62: Work on making integration-tests pass, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode ad4e825 20/62: Added some new lex analyzer tests for PHP 8.0 tokens, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a418e41 26/62: Integration-test now comparing nest-location-stack as well, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode f1b513c 27/62: Passed another integration test, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a900472 29/62: Passed bookkeeping tests, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 685375c 31/62: Passing all unit tests after updated lex-analyzer,
Christian Johansson <=
- [elpa] externals/phps-mode 050fe6a 36/62: Updated version and modified date, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode ec19574 43/62: More implementation of grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a99284a 39/62: Added TODO item, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 209055b 62/62: Updated date and version, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 86de51b 51/62: Fixed bug with incremental nesting stack, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a164e82 33/62: Updated README about PHP 8.0 lexer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 5a3bee3 40/62: More work on implementing PHP 8.0 grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a4b641d 56/62: Improved Make-script for compile and clean, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode d56472c 50/62: Added precedence attributes to grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode e92bed3 54/62: Started debugging failing indentation in some weird cases, Christian Johansson, 2021/04/20