[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode ba8165a 063/405: Fixed bug with brace count n
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode ba8165a 063/405: Fixed bug with brace count not including braces inside double quoted strings |
Date: |
Sat, 13 Jul 2019 09:59:44 -0400 (EDT) |
branch: externals/phps-mode
commit ba8165afd99bee6e839d17dfa69676ded1e98466
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed bug with brace count not including braces inside double quoted strings
---
phps-functions.el | 4 ++++
phps-test-functions.el | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/phps-functions.el b/phps-functions.el
index a0f4aa1..fe7ded9 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -171,6 +171,8 @@
('T_OPEN_TAG (setq start-in-scripting t))
('T_OPEN_TAG_WITH_ECHO (setq start-in-scripting t))
('T_CLOSE_TAG (setq start-in-scripting nil))
+ ('T_CURLY_OPEN (setq start-brace-level (+ start-brace-level
1)))
+ ('T_DOLLAR_OPEN_CURLY_BRACES (setq start-brace-level (+
start-brace-level 1)))
("}" (setq start-brace-level (- start-brace-level 1)))
("{" (setq start-brace-level (+ start-brace-level 1)))
("(" (setq start-parenthesis-level (+
start-parenthesis-level 1)))
@@ -191,6 +193,8 @@
('T_OPEN_TAG (setq end-in-scripting t))
('T_OPEN_TAG_WITH_ECHO (setq end-in-scripting t))
('T_CLOSE_TAG (setq end-in-scripting nil))
+ ('T_CURLY_OPEN (setq end-brace-level (+ end-brace-level 1)))
+ ('T_DOLLAR_OPEN_CURLY_BRACES (setq end-brace-level (+
end-brace-level 1)))
("}" (setq end-brace-level (- end-brace-level 1)))
("{" (setq end-brace-level (+ end-brace-level 1)))
("(" (setq end-parenthesis-level (+ end-parenthesis-level
1)))
diff --git a/phps-test-functions.el b/phps-test-functions.el
index 1ead7e7..b4ef345 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -123,6 +123,14 @@
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
(should (equal buffer-contents "<?php\n$variable = array(\n
'random4');\n$variable = true;\n"))))
+ (phps-mode/with-test-buffer
+ "<?php\nadd_filter(\n\"views_{$screen->id}\",'__return_empty_array'\n);"
+ (goto-char 25)
+ (phps-mode/indent-line)
+ ;; (message "Tokens %s point %s" phps-mode/lexer-tokens (point))
+ (let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
+ (should (equal buffer-contents "<?php\nadd_filter(\n
\"views_{$screen->id}\",'__return_empty_array'\n);"))))
+
)
(defun phps-mode/test-functions--get-point-data ()
- [elpa] externals/phps-mode a61cb8b 062/405: Fixed issue with doc comment indentation, (continued)
- [elpa] externals/phps-mode a61cb8b 062/405: Fixed issue with doc comment indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6c597fb 065/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 0ca9fe8 058/405: Detection of point inside doc comment block improved, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 67f9a7a 057/405: Moved lexer-get-point-data to functions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 27cd705 069/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 58300fd 070/405: More updates of readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 86ec35f 066/405: Incremental lexer working somewhat, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ec71e15 074/405: Fixed bug where token-numbers are not defined, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 236f05e 071/405: Updated makefile to not use hard-coded path to emacs, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bf633d2 061/405: Added test for indent of final line of doc comment block, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ba8165a 063/405: Fixed bug with brace count not including braces inside double quoted strings,
Stefan Monnier <=
- [elpa] externals/phps-mode 99dfc68 067/405: Incremental-lexer deletes affected overlays, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 90d059c 064/405: Fixed bug in incremental lexer logic, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1be9270 068/405: Updated README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e57f1e1 075/405: Skipping indentation if it's already correct, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c57fb5b 073/405: Improved indentation of trailing opening brace, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5e30a65 076/405: Added TODO items, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 94d4814 078/405: Added test for moving lexer tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a59ef7b 079/405: More unit tests for moving lexer token positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 287d934 077/405: Updated comments are made un-tested function for moving token positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b3821a1 080/405: Updated TODOs, Stefan Monnier, 2019/07/13