[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode a0358daa01 004/135: Added SDT for attributes
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode a0358daa01 004/135: Added SDT for attributes |
Date: |
Sun, 29 Jan 2023 03:10:58 -0500 (EST) |
branch: externals/phps-mode
commit a0358daa01d4e825a10587fcb5bf011a1802c53f
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Added SDT for attributes
---
phps-mode-parser-sdt.el | 164 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 160 insertions(+), 4 deletions(-)
diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index fd1d14ab27..f52dda1224 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -902,19 +902,175 @@
(puthash 89 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
;; 90 ((legacy_namespace_name) (T_NAME_FULLY_QUALIFIED))
-(puthash 90 (lambda(_args terminals) terminals)
phps-mode-parser--table-translations)
+(puthash 90 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
;; 91 ((name) (T_STRING))
(puthash 91 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
;; 92 ((name) (T_NAME_QUALIFIED))
-(puthash 92 (lambda(_args terminals) terminals)
phps-mode-parser--table-translations)
+(puthash 92 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
;; 93 ((name) (T_NAME_FULLY_QUALIFIED))
-(puthash 93 (lambda(_args terminals) terminals)
phps-mode-parser--table-translations)
+(puthash 93 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
;; 94 ((name) (T_NAME_RELATIVE))
-(puthash 94 (lambda(_args terminals) terminals)
phps-mode-parser--table-translations)
+(puthash 94 (lambda(args _terminals) args)
phps-mode-parser--table-translations)
+
+;; 95 ((attribute_decl) (class_name))
+(puthash
+ 95
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attribute-decl
+ class-name
+ ,args
+ ))
+ phps-mode-parser--table-translations)
+
+;; 96 ((attribute_decl) (class_name argument_list))
+(puthash
+ 96
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attribute-decl
+ class-name
+ ,(nth 0 args)
+ argument-list
+ ,(nth 1 args)
+ ))
+ phps-mode-parser--table-translations)
+
+;; 97 ((attribute_group) (attribute_decl))
+(puthash
+ 97
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attribute-group
+ children
+ (,args)
+ ))
+ phps-mode-parser--table-translations)
+
+;; 98 ((attribute_group) (attribute_group "," attribute_decl))
+(puthash
+ 98
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attribute-group
+ children
+ ,(append (plist-get (nth 0 args) 'ast-type) (nth 2 args))
+ ))
+ phps-mode-parser--table-translations)
+
+;; 99 ((attribute) (T_ATTRIBUTE attribute_group possible_comma "]"))
+(puthash
+ 99
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attribute
+ children
+ ,(nth 1 args)
+ ))
+ phps-mode-parser--table-translations)
+
+;; 100 ((attributes) (attribute))
+(puthash
+ 100
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributes
+ children
+ (,attribute)
+ ))
+ phps-mode-parser--table-translations)
+
+;; 101 ((attributes) (attributes attribute))
+(puthash
+ 101
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributes
+ children
+ ,(append (plist-get (nth 0 args) 'children) (nth 1 args))
+ ))
+ phps-mode-parser--table-translations)
+
+;; 102 ((attributed_statement) (function_declaration_statement))
+(puthash
+ 102
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributed-statement
+ ast-child-type
+ function
+ child
+ ,args
+ ))
+ phps-mode-parser--table-translations)
+
+;; 103 ((attributed_statement) (class_declaration_statement))
+(puthash
+ 103
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributed-statement
+ ast-child-type
+ class
+ child
+ ,args
+ ))
+ phps-mode-parser--table-translations)
+
+;; 104 ((attributed_statement) (trait_declaration_statement))
+(puthash
+ 104
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributed-statement
+ ast-child-type
+ trait
+ child
+ ,args
+ ))
+ phps-mode-parser--table-translations)
+
+;; 105 ((attributed_statement) (interface_declaration_statement))
+(puthash
+ 105
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributed-statement
+ ast-child-type
+ interface
+ child
+ ,args
+ ))
+ phps-mode-parser--table-translations)
+
+;; 106 ((attributed_statement) (enum_declaration_statement))
+(puthash
+ 106
+ (lambda(args _terminals)
+ `(
+ ast-type
+ attributed-statement
+ ast-child-type
+ enum
+ child
+ ,args
+ ))
+ phps-mode-parser--table-translations)
;; 111 top_statement -> (T_NAMESPACE namespace_declaration_name ";")
(puthash
- [elpa] externals/phps-mode updated (5fd766964d -> d5bdadc6fc), Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode b1d402cc39 001/135: Added some SDT rules, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode a0b350c316 003/135: More work on SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode a0358daa01 004/135: Added SDT for attributes,
Christian Johansson <=
- [elpa] externals/phps-mode 23fcce7ee0 006/135: SDT for use-top-statements, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 6816e24e04 005/135: More work on attributes SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode f333b4f0fd 007/135: SDT for possible_comma, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode c93e41b57f 013/135: Fixed new compilation errors in added SDT, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 44e618ffe3 023/135: SDT for trait_alias, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode dffe0d0485 029/135: More SDT rules, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 393edecde0 009/135: Started with bookkeeping index of objects, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode fd28fcbed3 012/135: Added SDT for unset_variables and more, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode 8c71d3838e 018/135: Added SDT for type, Christian Johansson, 2023/01/29
- [elpa] externals/phps-mode c782b18dc0 027/135: Merge branch 'master' into feature/full-sdt, Christian Johansson, 2023/01/29