[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 808f679 401/405: Moved TODO to separate doc a
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 808f679 401/405: Moved TODO to separate doc and improved syntax coloring |
Date: |
Sat, 13 Jul 2019 10:01:01 -0400 (EDT) |
branch: externals/phps-mode
commit 808f6796ffc9ca62b7453b3d783a726862dd8b3e
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Moved TODO to separate doc and improved syntax coloring
---
README.md | 41 +++++++++++++++--------------------------
docs/todo.md | 14 ++++++++++++++
phps-mode-lexer.el | 27 ++-------------------------
3 files changed, 31 insertions(+), 51 deletions(-)
diff --git a/README.md b/README.md
index 16d640f..55af1d1 100644
--- a/README.md
+++ b/README.md
@@ -7,32 +7,21 @@ An Emacs major mode for PHP scripting language which aims at
making a full seman
This mode does not require PHP installed on your computer because it has a
built-in elisp based lexer and parser. It supports all PHP versions and Emacs
>= 26.
-## Goals
-
-*With current progress estimates:*
-
-* GPLv3 license (100%)
-* Flycheck support (PHP Mess Detector, PHP Code Sniffer) (100%)
-* Lexer based on official PHP re2c lexer (100%)
-* Syntax coloring based on lexer tokens (100%)
-* PSR-1 and PSR-2 indentation based on lexer tokens (100%)
-* Integration with `(electric-pair)` (100%)
-* Incremental lexer and syntax coloring after buffer changes (100%)
-* Incremental indentation and imenu calculation after buffer changes (100%)
-* Supports `(comment-region)` and `(uncomment-region)` (100%)
-* From first stable release, use master branch for stable releases and develop
branch for on-going work (100%)
-* Travis support (100%)
-* Imenu support (100%)
-* Minimal mode map (100%)
-* A set of heuristics to improve large-file incremental change handling (50%)
-* Wisent LALR parser based on official PHP yacc parser automatically converted
grammar (50%)
-* Full integration with Emacs Semantic subsystem (30%)
-* Approach flycheck about including support for this module by default (0%)
-* Eldoc support (0%)
-* Flymake support (0%)
-* PSR-2 auto-formatting tool based on lexer tokens (0%)
-* Add to MELPA (0%)
-* Add to ELPA (0%)
+## Features
+
+* GPLv3 license
+* Flycheck support (PHP Mess Detector, PHP Code Sniffer)
+* Lexer based on official PHP re2c lexer
+* Syntax coloring based on lexer tokens
+* PSR-1 and PSR-2 indentation based on lexer tokens
+* Integration with `(electric-pair)`
+* Incremental lexer and syntax coloring after buffer changes
+* Incremental indentation and imenu calculation after buffer changes
+* Supports `(comment-region)` and `(uncomment-region)`
+* From first stable release, use master branch for stable releases and develop
branch for on-going work
+* Travis support
+* Imenu support
+* Minimal mode map
## Tests
diff --git a/docs/todo.md b/docs/todo.md
new file mode 100644
index 0000000..60673c0
--- /dev/null
+++ b/docs/todo.md
@@ -0,0 +1,14 @@
+## TODOs
+
+*With current progress estimates:*
+
+* A set of heuristics to improve large-file incremental change handling (50%)
+* Wisent LALR parser based on official PHP yacc parser automatically converted
grammar (50%)
+* Full integration with Emacs Semantic subsystem (30%)
+* Approach flycheck about including support for this module by default (0%)
+* Support indentation for HTML/XML, Javascript and CSS content inside
inline_html content (0%)
+* Eldoc support (0%)
+* Flymake support (0%)
+* PSR-2 auto-formatting tool based on lexer tokens (0%)
+* Add to MELPA (0%)
+* Add to ELPA (0%)
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index b2eb694..c3f0eb1 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -131,9 +131,6 @@
(defconst phps-mode-lexer-ST_VAR_OFFSET 9
"Flag whether we are looking for variable offset or not.")
-(defvar phps-mode-lexer-COLOR_SYNTAX-previous-token nil
- "Store previous token for color-syntax.")
-
;; REGULAR EXPRESSIONS
@@ -239,12 +236,6 @@
(overlay-put (make-overlay start end) 'font-lock-face
'font-lock-string-face))
((or
- (string= token "(")
- (string= token ")")
- (string= token "[")
- (string= token "]")
- (string= token "{")
- (string= token "}")
(string= token 'T_DOLLAR_OPEN_CURLY_BRACES)
(string= token 'T_CURLY_OPEN)
(string= token 'T_OBJECT_OPERATOR)
@@ -319,23 +310,11 @@
(overlay-put (make-overlay start end) 'font-lock-face
'font-lock-keyword-face))
((or
- (string= token "?")
- (string= token "!")
- (string= token "<")
- (string= token ">")
- (string= token ":")
- (string= token ",")
- (string= token ".")
- (string= token "%")
- (string= token "=")
(string= token 'T_OPEN_TAG)
(string= token 'T_OPEN_TAG_WITH_ECHO)
(string= token 'T_CLOSE_TAG)
(string= token 'T_START_HEREDOC)
(string= token 'T_END_HEREDOC)
- (string= token "`")
- (string= token "\"")
- (string= token ";")
(string= token 'T_ELLIPSIS)
(string= token 'T_COALESCE)
(string= token 'T_DOUBLE_ARROW)
@@ -391,9 +370,8 @@
((string= token 'T_ERROR)
(overlay-put (make-overlay start end) 'font-lock-face
'font-lock-warning-face))
- )
-
- (setq phps-mode-lexer-COLOR_SYNTAX-previous-token token))
+ (t (overlay-put (make-overlay start end) 'font-lock-face
'font-lock-constant-face)))
+ )
(defun phps-mode-lexer-RETURN_TOKEN (token start end)
"Push TOKEN to list with START and END."
@@ -1603,7 +1581,6 @@
(defun phps-mode-lexer-setup (start end)
"Just prepare other lexers for lexing region START to END."
;; (message "phps-mode-lexer-setup %s %s" start end)
- (setq phps-mode-lexer-COLOR_SYNTAX-previous-token nil)
;; Flag that buffer has not been processed
(when (and (boundp 'phps-mode-functions-processed-buffer)
- [elpa] externals/phps-mode 192f9ae 391/405: Fix issues with test list structure, (continued)
- [elpa] externals/phps-mode 192f9ae 391/405: Fix issues with test list structure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 21f883e 396/405: Updated README and copyright date, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f0912ee 398/405: Removed TODO and changed syntax color to be based on tokens only, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 47793f7 402/405: Updated README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2d2aaad 388/405: Added failing unit test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode fa47a17 390/405: Changed imenu index to a hierarchical structure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d05601b 387/405: Updated documents, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 07d9176 403/405: Improved flycheck support, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1d58896 400/405: Minimal mode map is now loaded, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 11e151a 382/405: Fixed linting issues in flycheck file, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 808f679 401/405: Moved TODO to separate doc and improved syntax coloring,
Stefan Monnier <=
- [elpa] externals/phps-mode f5c2072 405/405: Updated copyright for inclusion in ELPA, Stefan Monnier, 2019/07/13