branch: externals/phps-mode
commit e42646dc3af592c4e7408b85babe0d8128ac5a66
Author: Christian Johansson <christ...@cvj.se>
Commit: Christian Johansson <christ...@cvj.se>

    Added SDT for isset() and empty()
---
 phps-mode-parser-sdt.el | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/phps-mode-parser-sdt.el b/phps-mode-parser-sdt.el
index d37f16630d..0ab528de7d 100644
--- a/phps-mode-parser-sdt.el
+++ b/phps-mode-parser-sdt.el
@@ -941,5 +941,33 @@
    (list args))
  phps-mode-parser--table-translations)
 
+;; internal_functions_in_yacc -> (T_ISSET "(" isset_variables possible_comma 
")")
+(puthash
+ 538
+ (lambda(args _terminals)
+   `(ast-type isset-variables variables ,(nth 2 args)))
+ phps-mode-parser--table-translations)
+
+;; internal_functions_in_yacc -> (T_EMPTY "(" expr ")")
+(puthash
+ 539
+ (lambda(args _terminals)
+   `(ast-type empty-expression variables 
,(phps-mode-parser-sdt--get-list-of-object (nth 2 args))))
+ phps-mode-parser--table-translations)
+
+;; isset_variables -> (isset_variable)
+(puthash
+ 545
+ (lambda(args _terminals)
+   (list args))
+ phps-mode-parser--table-translations)
+
+;; isset_variables -> (isset_variables "," isset_variable)
+(puthash
+ 546
+ (lambda(args _terminals)
+   (append (nth 0 args) (nth 2 args)))
+ phps-mode-parser--table-translations)
+
 (provide 'phps-mode-parser-sdt)
 ;;; phps-mode-parser-sdt.el ends here

Reply via email to