[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 64a3ca8 014/405: Modified start and end for s
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 64a3ca8 014/405: Modified start and end for single and double quoted strings |
Date: |
Sat, 13 Jul 2019 09:59:30 -0400 (EDT) |
branch: externals/phps-mode
commit 64a3ca8818d3fe043cbed0b96e9d7d3dc0834bec
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Modified start and end for single and double quoted strings
---
phps-lexer.el | 8 ++++----
phps-test-lexer.el | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/phps-lexer.el b/phps-lexer.el
index 7907b06..0e75bae 100644
--- a/phps-lexer.el
+++ b/phps-lexer.el
@@ -836,8 +836,8 @@
;; Handle the '' case
(if (looking-at-p "'")
(progn
- ;; (message "Empty single quoted string from %s to %s" end
(+ end 1))
- (phps-mode/RETURN_TOKEN 'T_CONSTANT_ENCAPSED_STRING end (+
end 1))
+ ;; (message "Empty single quoted string from %s to %s" start
(+ start 2))
+ (phps-mode/RETURN_TOKEN 'T_CONSTANT_ENCAPSED_STRING start (+
start 2))
(forward-char))
(progn
;; Unclosed single quotes
@@ -878,8 +878,8 @@
;; Handle the "" case
(if (looking-at-p "\"")
(progn
- ;; (message "Empty double quoted string from %s to %s" end
(+ end 1))
- (phps-mode/RETURN_TOKEN 'T_CONSTANT_ENCAPSED_STRING end (+
end 1))
+ ;; (message "Empty double quoted string from %s to %s" start
(+ start 2))
+ (phps-mode/RETURN_TOKEN 'T_CONSTANT_ENCAPSED_STRING start (+
start 2))
(forward-char))
(progn
;; (message "Found no ending quote, skipping to end")
diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index e7d75fb..781668b 100644
--- a/phps-test-lexer.el
+++ b/phps-test-lexer.el
@@ -92,17 +92,17 @@
(phps-mode/with-test-buffer
"<?php echo $var = array('');"
(should (equal phps-mode/lexer-tokens
- '((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_VARIABLE 12 . 16)
("=" 17 . 18) (T_ARRAY 19 . 24) ("(" 24 . 25) (T_CONSTANT_ENCAPSED_STRING 26 .
27) (")" 27 . 28) (";" 28 . 29)))))
+ '((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_VARIABLE 12 . 16)
("=" 17 . 18) (T_ARRAY 19 . 24) ("(" 24 . 25) (T_CONSTANT_ENCAPSED_STRING 25 .
27) (")" 27 . 28) (";" 28 . 29)))))
(phps-mode/with-test-buffer
"<?php if
(empty($parameters[self::PARAMETER_CONFIGURATION_INTERNAL_FILENAME])) {
$parameters[self::PARAMETER_CONFIGURATION_INTERNAL_FILENAME] = ''; }"
(should (equal phps-mode/lexer-tokens
- '((T_OPEN_TAG 1 . 7) (T_IF 7 . 9) ("(" 10 . 11) (T_EMPTY 11
. 16) ("(" 16 . 17) (T_VARIABLE 17 . 28) ("[" 28 . 29) (T_STRING 29 . 33)
(T_PAAMAYIM_NEKUDOTAYIM 33 . 35) (T_STRING 35 . 76) ("]" 76 . 77) (")" 77 . 78)
(")" 78 . 79) ("{" 80 . 81) (T_VARIABLE 82 . 93) ("[" 93 . 94) (T_STRING 94 .
98) (T_PAAMAYIM_NEKUDOTAYIM 98 . 100) (T_STRING 100 . 141) ("]" 141 . 142) ("="
143 . 144) (T_CONSTANT_ENCAPSED_STRING 146 . 147) (";" 147 . 148) ("}" 149 .
150)))))
+ '((T_OPEN_TAG 1 . 7) (T_IF 7 . 9) ("(" 10 . 11) (T_EMPTY 11
. 16) ("(" 16 . 17) (T_VARIABLE 17 . 28) ("[" 28 . 29) (T_STRING 29 . 33)
(T_PAAMAYIM_NEKUDOTAYIM 33 . 35) (T_STRING 35 . 76) ("]" 76 . 77) (")" 77 . 78)
(")" 78 . 79) ("{" 80 . 81) (T_VARIABLE 82 . 93) ("[" 93 . 94) (T_STRING 94 .
98) (T_PAAMAYIM_NEKUDOTAYIM 98 . 100) (T_STRING 100 . 141) ("]" 141 . 142) ("="
143 . 144) (T_CONSTANT_ENCAPSED_STRING 145 . 147) (";" 147 . 148) ("}" 149 .
150)))))
(phps-mode/with-test-buffer
"<?php echo $var = array(\"\");"
(should (equal phps-mode/lexer-tokens
- '((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_VARIABLE 12 . 16)
("=" 17 . 18) (T_ARRAY 19 . 24) ("(" 24 . 25) (T_CONSTANT_ENCAPSED_STRING 26 .
27) (")" 27 . 28) (";" 28 . 29)))))
+ '((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_VARIABLE 12 . 16)
("=" 17 . 18) (T_ARRAY 19 . 24) ("(" 24 . 25) (T_CONSTANT_ENCAPSED_STRING 25 .
27) (")" 27 . 28) (";" 28 . 29)))))
(phps-mode/with-test-buffer
"<?php echo $var = array('abc' => '123');"
- [elpa] externals/phps-mode 8ed0716 022/405: Started with unit tests for getting point lexer data, (continued)
- [elpa] externals/phps-mode 8ed0716 022/405: Started with unit tests for getting point lexer data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abcfd01 021/405: Started with function to gather current point data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2475734 018/405: Improved logic for single quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 795053b 013/405: Lexer unit tests using start and ends as well, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 95e749e 028/405: Started with indentation function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3202213 025/405: Added another unit test for lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bf59f0a 023/405: More unit tests for getting point lex information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode de771b5 019/405: Added more unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e3a060a 026/405: Handles script breaking single-line comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7fa9fdb 024/405: More unit tests for lexing comments and doc comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 64a3ca8 014/405: Modified start and end for single and double quoted strings,
Stefan Monnier <=
- [elpa] externals/phps-mode 3ea8c64 003/405: Added license, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f6e3ce4 027/405: Added another test for comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4fa9341 030/405: Started with unit tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 184dfa5 034/405: Indentation outside PHP now does nothing, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5c0568b 033/405: Added some basic unit tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 47440dd 036/405: Added test for decreasing indentation with letters, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9d3f644 032/405: Separated indentation tests for lexer tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d839f8a 029/405: More work on indentation support, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode efcefde 035/405: Added support for closing parenthesis and braces, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1b891ea 031/405: More work on indentation and related tests, Stefan Monnier, 2019/07/13