[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 4753734b0a 006/212: Moved syntax coloring to
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 4753734b0a 006/212: Moved syntax coloring to separate file |
Date: |
Wed, 26 Jan 2022 01:50:10 -0500 (EST) |
branch: externals/phps-mode
commit 4753734b0a28a579aef6b0575782cb4eebccf700
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Moved syntax coloring to separate file
---
phps-mode-lex-analyzer.el | 606 +-----------------------------------------
test/phps-mode-test-parser.el | 90 +++----
2 files changed, 47 insertions(+), 649 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 6e18a5208e..6e099f47a4 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -36,6 +36,7 @@
(require 'phps-mode-macros)
(require 'phps-mode-parser)
(require 'phps-mode-serial)
+(require 'phps-mode-syntax-color)
(require 'semantic)
(require 'semantic/lex)
@@ -99,607 +100,6 @@
(defvar-local phps-mode-lex-analyzer--parse-error nil
"Non-nil means an error.")
-(defvar
- phps-mode-lex-analyzer--token-for-bookkeeping-p
- (make-hash-table :test 'equal)
- "Tokens that are connected to the bookkeeping of symbols.")
-(puthash
- 'T_VARIABLE
- t
- phps-mode-lex-analyzer--token-for-bookkeeping-p)
-(puthash
- 'T_STRING
- t
- phps-mode-lex-analyzer--token-for-bookkeeping-p)
-
-(defvar
- phps-mode-lex-analyzer--token-font-face
- (make-hash-table :test 'equal)
- "Token symbol to font face.")
-
-(puthash
- 'T_ERROR
- 'font-lock-warning-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_OPEN_TAG
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_OPEN_TAG_WITH_ECHO
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CLOSE_TAG
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_START_HEREDOC
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_END_HEREDOC
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ELLIPSIS
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_COALESCE
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DOUBLE_ARROW
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DOUBLE_ARROW
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INC
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DEC
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_IDENTICAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_NOT_IDENTICAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_NOT_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SPACESHIP
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_SMALLER_OR_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IS_GREATER_OR_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PLUS_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_MINUS_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_MUL_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_POW_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_POW
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DIV_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CONCAT_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_MOD_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SL_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SR_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_AND_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_OR_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_XOR_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_COALESCE_EQUAL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_BOOLEAN_OR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_BOOLEAN_AND
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_BOOLEAN_XOR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LOGICAL_XOR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LOGICAL_OR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LOGICAL_AND
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SL
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CLASS_C
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_TRAIT_C
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FUNC_C
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_METHOD_C
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LINE
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FILE
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DIR
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NS_C
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INT_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DOUBLE_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_STRING_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ARRAY_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_OBJECT_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_BOOL_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_UNSET_CAST
- 'font-lock-constant-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_DOLLAR_OPEN_CURLY_BRACES
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CURLY_OPEN
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_OBJECT_OPERATOR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NULLSAFE_OBJECT_OPERATOR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PAAMAYIM_NEKUDOTAYIM
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NS_SEPARATOR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_EXIT
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_RETURN
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_YIELD_FROM
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_YIELD
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_TRY
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CATCH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FINALLY
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_THROW
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IF
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ELSEIF
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDIF
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ELSE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_WHILE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDWHILE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DO
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FUNCTION
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FN
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CONST
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FOREACH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDFOREACH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FOR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDFOR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DECLARE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDDECLARE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INSTANCEOF
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_AS
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_SWITCH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_MATCH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENDSWITCH
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CASE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DEFAULT
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_BREAK
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CONTINUE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_GOTO
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ECHO
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PRINT
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CLASS
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INTERFACE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_TRAIT
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_EXTENDS
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_IMPLEMENTS
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NEW
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CLONE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_VAR
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_EVAL
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INCLUDE_ONCE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INCLUDE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_REQUIRE_ONCE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_REQUIRE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NAMESPACE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_USE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_INSTEADOF
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_GLOBAL
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ISSET
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_EMPTY
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_HALT_COMPILER
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_STATIC
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ABSTRACT
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_FINAL
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PRIVATE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PROTECTED
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_PUBLIC
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_UNSET
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LIST
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ARRAY
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CALLABLE
- 'font-lock-keyword-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_STRING
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_CONSTANT_ENCAPSED_STRING
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_ENCAPSED_AND_WHITESPACE
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NUM_STRING
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DNUMBER
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_LNUMBER
- 'font-lock-string-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_INLINE_HTML
- 'font-lock-preprocessor-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_ATTRIBUTE
- 'font-lock-doc-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_DOC_COMMENT
- 'font-lock-doc-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_COMMENT
- 'font-lock-doc-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'END
- 'font-lock-doc-face
- phps-mode-lex-analyzer--token-font-face)
-
-(puthash
- 'T_VARIABLE
- 'font-lock-variable-name-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_STRING_VARNAME
- 'font-lock-variable-name-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NAME_RELATIVE
- 'font-lock-variable-name-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NAME_QUALIFIED
- 'font-lock-variable-name-face
- phps-mode-lex-analyzer--token-font-face)
-(puthash
- 'T_NAME_FULLY_QUALIFIED
- 'font-lock-variable-name-face
- phps-mode-lex-analyzer--token-font-face)
-
;; FUNCTIONS
@@ -737,7 +137,7 @@
(bookkeeping-value))
(when (gethash
token-name
- phps-mode-lex-analyzer--token-for-bookkeeping-p)
+ phps-mode-syntax-color--token-for-bookkeeping-p)
(setq
start (car (cdr token)))
(setq
@@ -761,7 +161,7 @@
((when-let ((face
(gethash
token-name
- phps-mode-lex-analyzer--token-font-face)))
+ phps-mode-syntax-color--token-font-face)))
face))
(t 'font-lock-constant-face))))
diff --git a/test/phps-mode-test-parser.el b/test/phps-mode-test-parser.el
index 4b4bbd83c8..d7de43b546 100644
--- a/test/phps-mode-test-parser.el
+++ b/test/phps-mode-test-parser.el
@@ -317,7 +317,7 @@
;; top_statement_list -> (top_statement_list top_statement)
(puthash
79
- (lambda(args terminals)
+ (lambda(args _terminals)
;; (message "top_statement_list: %S" args)
(let ((ast-object))
(if (car args)
@@ -383,7 +383,7 @@
;; top_statement -> (T_NAMESPACE "{" top_statement_list "}")
(puthash
108
- (lambda(args terminals)
+ (lambda(args _terminals)
(message "T_NAMESPACE: %S" args)
(when (nth 2 args)
(setq
@@ -449,7 +449,7 @@
;; class_statement_list -> (class_statement_list class_statement)
(puthash
276
- (lambda(args terminals)
+ (lambda(args _terminals)
;; (message "class_statement_list: %S" args)
(let ((ast-object))
(if (car args)
@@ -496,7 +496,7 @@
production-number
(car (car production))
(car (cdr production))))))
- (let ((translation (phps-mode-parser-translate))
+ (let ((_translation (phps-mode-parser-translate))
(imenu-index))
;; (message "translation: %S" translation)
@@ -511,46 +511,45 @@
(message "\nAST:\n%S\n" ast)
- (let ((imenu-index))
- (dolist (item ast)
- (let ((children (plist-get item 'children))
- (item-type (plist-get item 'type))
- (parent))
- (if (and
- (or
- (equal item-type 'namespace)
- (equal item-type 'class))
- children)
- (progn
- (dolist (child children)
- (let ((grandchildren (plist-get child 'children))
- (child-type (plist-get child 'type))
- (subparent))
- (if (and
- (equal child-type 'class)
- grandchildren)
- (progn
- (dolist (grandchild grandchildren)
- (push
- `(,(plist-get grandchild 'name) .
,(plist-get grandchild 'index))
- subparent))
+ (dolist (item ast)
+ (let ((children (plist-get item 'children))
+ (item-type (plist-get item 'type))
+ (parent))
+ (if (and
+ (or
+ (equal item-type 'namespace)
+ (equal item-type 'class))
+ children)
+ (progn
+ (dolist (child children)
+ (let ((grandchildren (plist-get child 'children))
+ (child-type (plist-get child 'type))
+ (subparent))
+ (if (and
+ (equal child-type 'class)
+ grandchildren)
+ (progn
+ (dolist (grandchild grandchildren)
(push
- (append
- (list (plist-get child 'name))
- (reverse subparent))
- parent))
- (push
- `(,(plist-get child 'name) . ,(plist-get child
'index))
- parent)))
- )
- (push
- (append
- (list (plist-get item 'name))
- (reverse parent))
- imenu-index))
- (push
- `(,(plist-get item 'name) . ,(plist-get item 'index))
- imenu-index))))
+ `(,(plist-get grandchild 'name) . ,(plist-get
grandchild 'index))
+ subparent))
+ (push
+ (append
+ (list (plist-get child 'name))
+ (reverse subparent))
+ parent))
+ (push
+ `(,(plist-get child 'name) . ,(plist-get child
'index))
+ parent)))
+ )
+ (push
+ (append
+ (list (plist-get item 'name))
+ (reverse parent))
+ imenu-index))
+ (push
+ `(,(plist-get item 'name) . ,(plist-get item 'index))
+ imenu-index))))
(message "imenu-index:\n%S\n" imenu-index)
@@ -558,7 +557,7 @@
(equal
imenu-index
'(("MyNamespace" ("aFunction" . 41) ("MyClass" ("__construct" .
160) ("myFunction1" . 261) ("myFunction2" . 433) ("myFunction3" . 513)
("myFunction4" . 583))))))
- ))))
+ )))
(setq
ast-current-namespace
@@ -585,8 +584,7 @@
production-number
(car (car production))
(car (cdr production))))))
- (let ((translation (phps-mode-parser-translate))
- (imenu-index))
+ (let ((_translation (phps-mode-parser-translate)))
;; (message "translation: %S" translation)
(when ast-current-namespace
- [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list, (continued)
- [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode dece7f242e 160/212: Added more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8c1f529f87 145/212: Passing indent for line after ending of statement / expression with trailing closing bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d7aa22d251 146/212: Added two new failing tests for indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c453932f32 139/212: Added TODO item, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8374026917 166/212: Improved indentation on lines starting with a closing square bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2afb7dc87a 002/212: Generating basic imenu-index via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 41b1566c40 010/212: Imenu generation via parser SDT passing more tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8f9870fb9b 013/212: Parser SDT does not use global variables, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 4753734b0a 006/212: Moved syntax coloring to separate file,
Christian Johansson <=
- [elpa] externals/phps-mode d037aa09bc 023/212: Added bookkeeping via parser SDT foreach ($x as $y) {}, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3d54b6ff01 022/212: Passed another test for bookkeeping generated via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 442ad93cb2 018/212: Fix for function parameter formatting in AST, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2a4d5dea37 019/212: Passed bookkeeping of function arguments, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c29e35fea2 021/212: More work on bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 0daaa97f8d 025/212: SDT for for() loop started, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode fa3681141b 027/212: Passed test for bookkeeping of conditional assignment via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode fc4c763d68 030/212: Added SDT for class properties, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode f7c261cee1 032/212: Generate parser command now compatible with latest emacs-parser-generator, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode f82c9a377d 033/212: Re-generated parser to verify automation functionality, improved automation documentation, Christian Johansson, 2022/01/26