[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode c9f6fdb 82/96: Mode-line status now signals p
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode c9f6fdb 82/96: Mode-line status now signals parser errors |
Date: |
Fri, 29 Oct 2021 11:15:01 -0400 (EDT) |
branch: externals/phps-mode
commit c9f6fdb818980b7700256e65d6f34624ca59bbf5
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Mode-line status now signals parser errors
---
phps-mode-lex-analyzer.el | 55 ++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 29 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 4de830c..8a688d7 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -454,18 +454,28 @@
(setq phps-mode-lex-analyzer--parse-trail parse-trail)
(setq phps-mode-lex-analyzer--parse-error parse-error)
- ;; Display parser error (if any)
+ ;; Signal parser error (if any)
(when phps-mode-lex-analyzer--parse-error
- (setq phps-mode-serial--status 'error)
+
+ ;; Paint error
(phps-mode-lex-analyzer--set-region-syntax-color
(nth 4 phps-mode-lex-analyzer--parse-error)
(point-max)
(list 'font-lock-face 'font-lock-warning-face))
+
+ ;; Display error
(display-warning
'phps-mode
(nth 1 phps-mode-lex-analyzer--parse-error)
:warning
- "*PHPs Parser Errors*"))))))
+ "*PHPs Parser Errors*")
+
+ ;; Signal that causes updated mode-line status
+ (signal
+ 'phps-parser-error
+ (list
+ (nth 1 phps-mode-lex-analyzer--parse-error)
+ (nth 4 phps-mode-lex-analyzer--parse-error))))))))
(lambda(result)
(when (get-buffer buffer-name)
@@ -474,7 +484,6 @@
(error-message (nth 1 result))
(error-start (nth 2 result))
(error-end (nth 3 result)))
-
(phps-mode-lex-analyzer--reset-local-variables)
(when error-message
@@ -497,17 +506,6 @@
:warning
"*PHPs Lexer Errors*"))
- ((equal error-type 'phps-parser-error)
- (phps-mode-lex-analyzer--set-region-syntax-color
- (nth 5 result)
- (point-max)
- (list 'font-lock-face 'font-lock-warning-face))
- (display-warning
- 'phps-mode
- (nth 2 result)
- :warning
- "*PHPs Parser Errors*"))
-
(t
(display-warning
error-type
@@ -622,18 +620,28 @@
(setq phps-mode-lex-analyzer--parse-trail parse-trail)
(setq phps-mode-lex-analyzer--parse-error parse-error)
- ;; Display parser error (if any)
+ ;; Signal parser error (if any)
(when phps-mode-lex-analyzer--parse-error
- (setq phps-mode-serial--status 'error)
+
+ ;; Paint error
(phps-mode-lex-analyzer--set-region-syntax-color
(nth 4 phps-mode-lex-analyzer--parse-error)
(point-max)
(list 'font-lock-face 'font-lock-warning-face))
+
+ ;; Display error
(display-warning
'phps-mode
(nth 1 phps-mode-lex-analyzer--parse-error)
:warning
- "*PHPs Parser Errors*"))))))
+ "*PHPs Parser Errors*")
+
+ ;; Signal that causes updated mode-line status
+ (signal
+ 'phps-parser-error
+ (list
+ (nth 1 phps-mode-lex-analyzer--parse-error)
+ (nth 4 phps-mode-lex-analyzer--parse-error))))))))
(lambda(result)
(when (get-buffer buffer-name)
@@ -665,17 +673,6 @@
:warning
"*PHPs Lexer Errors*"))
- ((equal error-type 'phps-parser-error)
- (phps-mode-lex-analyzer--set-region-syntax-color
- (nth 5 result)
- (point-max)
- (list 'font-lock-face 'font-lock-warning-face))
- (display-warning
- 'phps-mode
- (nth 2 result)
- :warning
- "*PHPs Parser Errors*"))
-
(t
(display-warning
error-type
- [elpa] externals/phps-mode eced7be 77/96: Parser now not dependent on lex-analyzer variables, (continued)
- [elpa] externals/phps-mode eced7be 77/96: Parser now not dependent on lex-analyzer variables, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 4f7126b 70/96: Fixed automation grammar setting of lex-analyzer functions, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode ce5e28e 72/96: Added generated grammar in output of automation, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode e698a2e 64/96: Re-generated parser with automated grammar, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 128868c 75/96: Added another parse test, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode f44577a 79/96: More testing integrating parser and lex-analyzer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 7cfa35c 81/96: Improved error-reporting for parser errors, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 91b425f 73/96: Update of parsers lex-analyzer function to not depend on lexer buffer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 0f11914 83/96: Fixed lexer issue with wrong token for expressions inside double quoted strings, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 50c9b31 84/96: Added 2 TODO items, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c9f6fdb 82/96: Mode-line status now signals parser errors,
Christian Johansson <=
- [elpa] externals/phps-mode e007ea7 88/96: Fixed parser-mode issue with parser and lex-analyzer integration, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode bc8306f 71/96: Fix in automation grammar to support exporting, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 238f967 76/96: Cleaned up lex function, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 5e375e3 80/96: Parser is not blocking lexer anymore, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 7b62779 86/96: Added another TODO item, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c5058c5 87/96: Fixed issue with async.el support for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 8e263fe 85/96: Removed T_DIE as token as it's replaced by T_EXIT, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 3489f9d 90/96: Parser parse function now ignores creating a SDT, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 620ec6e 91/96: Optimization of parser speed, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode ff25e3d 92/96: Removed obsolete files, Christian Johansson, 2021/10/29