[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 1aadb1b 285/405: Added failing lexer test for
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 1aadb1b 285/405: Added failing lexer test for comment vs doc-comment |
Date: |
Sat, 13 Jul 2019 10:00:33 -0400 (EDT) |
branch: externals/phps-mode
commit 1aadb1b6a28439f898ffd131176ba28fc1dc34f0
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added failing lexer test for comment vs doc-comment
---
phps-mode-lexer.el | 2 +-
phps-mode-test-lexer.el | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index f6e51809..f2e887c 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -1312,7 +1312,7 @@
)))))
(phps-mode-lexer-re2c-rule
- (and ST_IN_SCRIPTING (looking-at (concat "\\(/\\*\\|/\\*\\*\\)"
phps-mode-lexer-WHITESPACE)))
+ (and ST_IN_SCRIPTING (looking-at (concat "\\(/\\*\\|/\\*\\*"
phps-mode-lexer-WHITESPACE "\\)")))
(lambda()
(let* ((start (match-beginning 0))
(end (match-end 0))
diff --git a/phps-mode-test-lexer.el b/phps-mode-test-lexer.el
index a08a5e3..d201484 100644
--- a/phps-mode-test-lexer.el
+++ b/phps-mode-test-lexer.el
@@ -175,7 +175,12 @@
(should (equal (phps-mode-lexer-get-tokens)
'((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_VARIABLE 12 . 18)
("[" 18 . 19) (T_CONSTANT_ENCAPSED_STRING 19 . 24) ("]" 24 . 25) (";" 25 . 26)
(T_ECHO 27 . 31) ("\"" 32 . 33) (T_ENCAPSED_AND_WHITESPACE 33 . 36) (T_VARIABLE
36 . 43) (T_NUM_STRING 43 . 45) ("]" 45 . 46) (T_CONSTANT_ENCAPSED_STRING 46 .
63) ("\"" 63 . 64) (";" 64 . 65)))))
- ;; TODO Add test for long as var offset
+ (phps-mode-test-with-buffer
+ "<?php\n/*my comment */\n/** my doc comment */"
+ "Comment vs doc-comment"
+ (message "Tokens: %s" (phps-mode-lexer-get-tokens))
+ (should (equal (phps-mode-lexer-get-tokens)
+ '((T_OPEN_TAG 1 . 7) (T_COMMENT 7 . 22) (T_DOC_COMMENT 23 .
44)))))
;; (phps-mode-test-with-buffer
;; "<?php ??= $var EXIT die function return yield from yield try catch
finally throw if elseif endif else while endwhile do for endfor foreach
endforeach declare enddeclare instanceof as switch endswitch case default break
continue goto echo print class interface trait extends implements :: \\ ... ??
new clone var (int) (integer) (real) (double) (float) (string) (binary) (array)
(object) (boolean) (bool) (unset) eval include include_once require
require_once namespace use insteadof gl [...]
- [elpa] externals/phps-mode 66edaca 286/405: Improved lexing of comment version doc comment, (continued)
- [elpa] externals/phps-mode 66edaca 286/405: Improved lexing of comment version doc comment, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 55f61b0 296/405: New algorithm for concatenation indentation passes tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9069d0a 300/405: Concatenation indentation now uses stack, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e639ea3 299/405: Indent passing new concatenation tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5be3560 291/405: Adding more indent examples from PSR-2, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 74ab2a7 294/405: Work on incremental lexer and failing test for indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b31f817 292/405: Added all examples from PSR-2 as tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2087abd 282/405: Added two failing tests for switch indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 43c13b4 295/405: Started on new algorithm for concatenation indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b2ff76e 283/405: Started on debugging switch indentation bug, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1aadb1b 285/405: Added failing lexer test for comment vs doc-comment,
Stefan Monnier <=
- [elpa] externals/phps-mode 95de04b 274/405: New layout for lexer grammar passes unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 00d3568 290/405: Added indentation examples from official PSR-2, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ec3fd41 289/405: Added failing indent test for mixed concatenation and function call, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode cc77604 284/405: Fixed bug with indentation after switch case statements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode eeffdb2 315/405: Fixed trailing white-space, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 02b69f5 304/405: Tests for PSR-2 now passes with new algorithms, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b251a1e 314/405: Got unit tests for wrapping region in symbols working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 20199b0 307/405: Added byte-compiled Lisp to gitignore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a0b7695 316/405: Passes unit tests for integration with electric-pair, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7c3a31a 305/405: Fixed bug in indentation with stacked assignment closures, Stefan Monnier, 2019/07/13