[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode ce656a5 006/405: More general cleaning up
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode ce656a5 006/405: More general cleaning up |
Date: |
Sat, 13 Jul 2019 09:59:28 -0400 (EDT) |
branch: externals/phps-mode
commit ce656a57256030c3f421c449b6c0b4a252d83998
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
More general cleaning up
---
phps-automation.el | 8 +++--
phps-flymake.el | 3 +-
phps-font-lock.el | 93 +---------------------------------------------------
phps-map.el | 2 ++
phps-syntax-table.el | 1 -
5 files changed, 9 insertions(+), 98 deletions(-)
diff --git a/phps-automation.el b/phps-automation.el
index 3ab13df..46687fc 100644
--- a/phps-automation.el
+++ b/phps-automation.el
@@ -1,8 +1,9 @@
-;;; phps-automation --- Genereate a Wisent Parser file
+;;; phps-automation --- Generate a Wisent Parser file
;;; Commentary:
+
;;; Uses a parser to convert LALR Yacc grammar to Wisent grammar
;;; AST should be like this: (root (block (rule (logic))))
@@ -10,6 +11,7 @@
;;; Code:
+
(add-to-list 'load-path (expand-file-name
"~/.emacs.d/emacs-wisent-grammar-converter/"))
(require 'emacs-wisent-grammar-converter)
@@ -28,5 +30,5 @@
(emacs-wisent-grammar-converter/generate-grammar-from-filename php-yacc-file
wisent-destination)
(message "Automation completed"))
-(provide 'phps-automation2)
-;;; phps-automation2.el ends here
+(provide 'phps-automation)
+;;; phps-automation.el ends here
diff --git a/phps-flymake.el b/phps-flymake.el
index 6da1421..05dddca 100644
--- a/phps-flymake.el
+++ b/phps-flymake.el
@@ -32,9 +32,8 @@
;;; Commentary:
-;; Please see README.md from the same repository for extended documentation.
-;;; Commentary:
+;; Please see README.md from the same repository for extended documentation.
;;; Code:
diff --git a/phps-font-lock.el b/phps-font-lock.el
index ca28b42..7b23db9 100644
--- a/phps-font-lock.el
+++ b/phps-font-lock.el
@@ -32,103 +32,13 @@
;;; Commentary:
-;; Please see README.md from the same repository for extended documentation.
-;;; Commentary:
+;; Please see README.md from the same repository for extended documentation.
;;; Code:
-(defconst phps-mode/keywords
- (list
- "__halt_compiler"
- "abstract"
- "and"
- "array"
- "as"
- "break"
- "callable"
- "case"
- "catch"
- "class"
- "clone"
- "const"
- "continue"
- "declare"
- "default"
- "die"
- "do"
- "echo"
- "else"
- "elseif"
- "empty"
- "enddeclare"
- "endfor"
- "endforeach"
- "endif"
- "endswitch"
- "endwhile"
- "eval"
- "exit"
- "extends"
- "final"
- "finally"
- "for"
- "foreach"
- "function"
- "global"
- "goto"
- "if"
- "implements"
- "include"
- "include_once"
- "instanceof"
- "insteadof"
- "interface"
- "isset"
- "list"
- "namespace"
- "new"
- "or"
- "print"
- "private"
- "protected"
- "public"
- "require"
- "require_once"
- "return"
- "static"
- "switch"
- "throw"
- "trait"
- "try"
- "unset"
- "use"
- "var"
- "while"
- "xor"
- "yield"
-
- ;; Compile-time constants here
- "__CLASS__"
- "__DIR__"
- "__FILE__"
- "__FUNCTION__"
- "__LINE__"
- "__METHOD__"
- "__NAMESPACE__"
- "__TRAIT__"
- )
- "Use list of keywords to build regular expression for syntax highlighting.")
-
-(defconst phps-mode/font-lock-keywords
- (let ((regex (concat "\\<" (regexp-opt phps-mode/keywords t) "\\>")))
- (list
- `(,regex . font-lock-builtin-face)
- '("\\('\\w*'\\)" . font-lock-variable-name-face)))
- "Minimal highlighting expressions for major mode.")
-
(defun phps-mode/font-lock-init ()
"Apply font-lock."
@@ -137,7 +47,6 @@
;; This makes it possible to have full control over syntax coloring from the
lexer
(set (make-local-variable 'font-lock-defaults) '(nil t))
- ;; (set (make-local-variable 'font-lock-defaults)
'(phps-mode/font-lock-keywords))
)
(provide 'phps-mode/font-lock)
diff --git a/phps-map.el b/phps-map.el
index 12320a6..e398e31 100644
--- a/phps-map.el
+++ b/phps-map.el
@@ -30,8 +30,10 @@
;;; Commentary:
+
;; Please see README.md from the same repository for extended documentation.
+
;;; Code:
diff --git a/phps-syntax-table.el b/phps-syntax-table.el
index 0bd9e61..c35268b 100644
--- a/phps-syntax-table.el
+++ b/phps-syntax-table.el
@@ -65,7 +65,6 @@
(defun phps-mode/syntax-table-init ()
"Apply syntax table."
- ;; (setq font-lock-keywords-only t)
(set-syntax-table phps-mode/syntax-table))
(provide 'phps-mode/syntax-table)
- [elpa] branch externals/phps-mode created (now f5c2072), Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7d0cd36 002/405: Updated goals, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dd8d800 004/405: Using coloring overlay for comments as well, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c64b3b4 008/405: More work on lexer tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a724438 010/405: Handled lexing with empty single and double quote string, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5a6a96b 012/405: Added another test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b3a6308 015/405: Added hook for resetting lexer variables, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ce656a5 006/405: More general cleaning up,
Stefan Monnier <=
- [elpa] externals/phps-mode f3205d5 011/405: Fixed lexing of basic tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 31ca9d5 007/405: More cleaning up, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 79040dc 005/405: Some cleaning up, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 394f7ae 017/405: Fixed issue with empty strings before non-empty strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 41c4fbb 009/405: Lexer unit tests now working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode be078dc 020/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c4a8ca5 016/405: Free lexer tokens does not have properties anymore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8ed0716 022/405: Started with unit tests for getting point lexer data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abcfd01 021/405: Started with function to gather current point data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2475734 018/405: Improved logic for single quoted strings, Stefan Monnier, 2019/07/13