[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 13c4c78 164/405: More work on heredoc
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 13c4c78 164/405: More work on heredoc |
Date: |
Sat, 13 Jul 2019 10:00:05 -0400 (EDT) |
branch: externals/phps-mode
commit 13c4c7808a7872063bf5af0e52ef5d84fccafc48
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
More work on heredoc
---
phps-mode-functions.el | 3 ++-
phps-mode-test-functions.el | 14 ++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 37d38ab..cb1ea0e 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -299,7 +299,8 @@
(setq after-special-control-structure-token token))
;; Keep track of assignments
- (when in-assignment
+ (when (and in-assignment
+ (not in-heredoc))
(if (string= token ";")
(progn
(setq in-assignment nil)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index bedaedc..04236f3 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -90,12 +90,6 @@
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)) (5 (1 0)) (6 (1
0)) (7 (1 0)) (8 (1 0))) (phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
- "<?php\nclass MyClass extends MyAbstract implements\n myInterface,\n
myInterface2\n{\n}\n"
- "Class multi-line implements"
- (message "Tokens: %s" phps-mode-lexer-tokens)
- (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)) (5 (0 0)) (6 (0
0))) (phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
-
- (phps-mode-test-with-buffer
"<?php\n$str = <<<'EOD'\nExample of string\nspanning multiple lines\nusing
nowdoc syntax.\nEOD;\n"
"Multi-line NOWDOC string"
(message "Tokens: %s" phps-mode-lexer-tokens)
@@ -107,9 +101,13 @@
(message "Tokens: %s" phps-mode-lexer-tokens)
(should (equal '((1 (0 0)) (2 (0 0)) (3 (0 0)) (4 (0 0)) (5 (0 0)) (6 (0
0))) (phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
- ;; TODO NOWDOC
+ (phps-mode-test-with-buffer
+ "<?php\nclass MyClass extends MyAbstract implements\n myInterface,\n
myInterface2\n{\n}\n"
+ "Class multi-line implements"
+ (message "Tokens: %s" phps-mode-lexer-tokens)
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)) (5 (0 0)) (6 (0
0))) (phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
-(phps-mode-test-with-buffer
+ (phps-mode-test-with-buffer
"<?php\n$var = \"A line\nmore text here\nlast line here\";"
"Multi-line double-quoted string"
(message "Tokens: %s" phps-mode-lexer-tokens)
- [elpa] externals/phps-mode 9d6af11 157/405: More work on indentations, (continued)
- [elpa] externals/phps-mode 9d6af11 157/405: More work on indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e249124 152/405: Prevent negative indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4a27c44 147/405: Added support for naming unit tests to better find failures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b852f5f 160/405: All tests for indentation passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dfb0427 151/405: Added unit test for round and square bracket expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7b8cea3 163/405: Added failing indentation test for class multiple implements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a61ff64 134/405: Renamed function get-point-data to get-current-line-data for better semantics, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b99da6b 153/405: Starting using new indentation calculation for indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6559760 166/405: Work on assignments and class declaration indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2720be8 165/405: Indentation calculation for heredoc and nowdoc assignments passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 13c4c78 164/405: More work on heredoc,
Stefan Monnier <=
- [elpa] externals/phps-mode 47ffc37 179/405: More work on refactored indentation calculation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a5ced61 158/405: New indentation function passes all original unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e3eedd7 167/405: Assignment indentation passes tests, class declaration remains, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e37c1cf 150/405: New indention calculation works with doc-comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f789468 172/405: Took notes of new indentation tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 20e77aa 181/405: Removed debug output, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 321803a 182/405: Line indents are now cleaning on buffer changes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 38bcabb 176/405: Improved detection of assignment ends in function optional arguments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f1236e2 169/405: Unit tests for indentation calculation for multi-line strings passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 105fece 149/405: New indent calculation for inline syntax passes test, Stefan Monnier, 2019/07/13