[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 71858d1 374/405: Removed side-effect of END_P
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 71858d1 374/405: Removed side-effect of END_PARSE token being added to tokens after processing buffer |
Date: |
Sat, 13 Jul 2019 10:00:54 -0400 (EDT) |
branch: externals/phps-mode
commit 71858d1a4c1829276c0816e8f9a13a763a7f7eba
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Removed side-effect of END_PARSE token being added to tokens after
processing buffer
---
phps-mode-functions.el | 2 +-
phps-mode-test-functions.el | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 7df727c..d169e85 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -178,7 +178,7 @@
(token-end nil)
(token-start-line-number 0)
(token-end-line-number 0)
- (tokens (nreverse phps-mode-lexer-tokens))
+ (tokens (nreverse (copy-sequence phps-mode-lexer-tokens)))
(nesting-stack nil)
(nesting-key nil)
(class-declaration-started-this-line nil)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index a3296e1..c59541a 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -907,8 +907,6 @@
'((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13)
(T_CONSTANT_ENCAPSED_STRING 14 . 19) (";" 19 . 20) (T_VARIABLE 23 . 28) ("=" 29
. 30) (T_CONSTANT_ENCAPSED_STRING 31 . 36) (";" 36 . 37))))
)
- ;; TODO The test below should not contain END_PARSE token, incremental lexer
should not be triggered by inserting a newline and indenting
-
(phps-mode-test-with-buffer
"<?php\nif (true):\n $var = 'abc';\n $var2 = '123';\nendif;\n"
"Add newline inside if body after two assignments and inspect moved tokens
and states"
@@ -919,7 +917,7 @@
(newline-and-indent)
;; (message "Tokens %s" (phps-mode-lexer-get-tokens))
(should (equal (phps-mode-lexer-get-tokens)
- '((T_OPEN_TAG 1 . 7) (T_IF 7 . 9) ("(" 10 . 11) (T_STRING 11
. 15) (")" 15 . 16) (":" 16 . 17) (T_VARIABLE 22 . 26) ("=" 27 . 28)
(T_CONSTANT_ENCAPSED_STRING 29 . 34) (";" 34 . 35) (T_VARIABLE 40 . 45) ("=" 46
. 47) (T_CONSTANT_ENCAPSED_STRING 48 . 53) (";" 53 . 54) (T_ENDIF 60 . 65) (";"
65 . 66) (END_PARSE 68 . 68)))))
+ '((T_OPEN_TAG 1 . 7) (T_IF 7 . 9) ("(" 10 . 11) (T_STRING 11
. 15) (")" 15 . 16) (":" 16 . 17) (T_VARIABLE 22 . 26) ("=" 27 . 28)
(T_CONSTANT_ENCAPSED_STRING 29 . 34) (";" 34 . 35) (T_VARIABLE 40 . 45) ("=" 46
. 47) (T_CONSTANT_ENCAPSED_STRING 48 . 53) (";" 53 . 54) (T_ENDIF 60 . 65) (";"
65 . 66)))))
)
- [elpa] externals/phps-mode d6e6cbc 358/405: Another optimization of line-number-at-pos inside loop, (continued)
- [elpa] externals/phps-mode d6e6cbc 358/405: Another optimization of line-number-at-pos inside loop, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e681c9c 347/405: Updated color syntax for T_STRING tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c11bcc5 360/405: More work on newline advice, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 282115f 357/405: Using incremental line-number calculation as optimization, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c118f58 342/405: Added TODO items, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 812dc49 353/405: Removed TODO item, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 834275b 354/405: Fixed indentation calculation of nested alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 62f1fc5 348/405: Added another failing indentation test for return expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 071acc0 349/405: Added support for multi-line return indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 46d0575 373/405: Passes all tests for adding newline and indenting without affect lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 71858d1 374/405: Removed side-effect of END_PARSE token being added to tokens after processing buffer,
Stefan Monnier <=
- [elpa] externals/phps-mode 228b657 380/405: Updated README with license logo and Travis CI build status, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6308e3e 366/405: Removed debug notice, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bd90dc9 370/405: Removed debug output, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 38bd348 361/405: More work on advice, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2efd7d7 367/405: Started on function to move line-indent index, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5bc592a 368/405: More work on moving indent indexes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bc1f50f 365/405: Fixed byte-compilation in functions unit-test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 654ef5f 377/405: Added another state test for newline, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode fe80a3a 369/405: Passes test for moving line-indents down, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 07ed24d 376/405: Added states test as well, Stefan Monnier, 2019/07/13