emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode 8e263fe 85/96: Removed T_DIE as token as it's


From: Christian Johansson
Subject: [elpa] externals/phps-mode 8e263fe 85/96: Removed T_DIE as token as it's replaced by T_EXIT
Date: Fri, 29 Oct 2021 11:15:02 -0400 (EDT)

branch: externals/phps-mode
commit 8e263fe0fd03500f989754c9c4bf5ba1d59df5ac
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Removed T_DIE as token as it's replaced by T_EXIT
---
 phps-mode-lex-analyzer.el     |  1 -
 phps-mode-lexer.el            |  2 +-
 test/phps-mode-test-parser.el | 13 ++++++-------
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 8a688d7..b022d1d 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -187,7 +187,6 @@
        (equal token-name 'T_PAAMAYIM_NEKUDOTAYIM)
        (equal token-name 'T_NS_SEPARATOR)
        (equal token-name 'T_EXIT)
-       (equal token-name 'T_DIE)
        (equal token-name 'T_RETURN)
        (equal token-name 'T_YIELD_FROM)
        (equal token-name 'T_YIELD)
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index bed22e5..7b8953b 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -518,7 +518,7 @@
 
       (phps-mode-lexer--match-macro
        (and ST_IN_SCRIPTING (looking-at "die"))
-       (phps-mode-lexer--return-token-with-indent 'T_DIE))
+       (phps-mode-lexer--return-token-with-indent 'T_EXIT))
 
       (phps-mode-lexer--match-macro
        (and ST_IN_SCRIPTING (looking-at "fn"))
diff --git a/test/phps-mode-test-parser.el b/test/phps-mode-test-parser.el
index 1151732..010f91b 100644
--- a/test/phps-mode-test-parser.el
+++ b/test/phps-mode-test-parser.el
@@ -272,6 +272,12 @@
    (lambda()
      (phps-mode-parser-parse)))
 
+  (phps-mode-test-parser--buffer-contents
+   "<?php\n\n//die program normally\ndie;\ndie();\ndie(0);\n\n//die with an 
error code\ndie(1);\ndue(0376); //octal\n\n?>"
+   "Example #2 die status example"
+   (lambda()
+     (phps-mode-parser-parse)))
+
   ;; TODO Make this work
   ;; (phps-mode-test-parser--buffer-contents
   ;;  "<?php\n$food = 'cake';\n\n$return_value = match ($food) {\n    'apple' 
=> 'This food is an apple',\n    'bar' => 'This food is a bar',\n    'cake' => 
'This food is a cake',\n};\n\nvar_dump($return_value);\n?>"
@@ -279,13 +285,6 @@
   ;;  (lambda()
   ;;    (phps-mode-parser-parse)))
 
-  ;; TODO Make this work
-  ;; (phps-mode-test-parser--buffer-contents
-  ;;  "<?php\n\n//die program normally\ndie;\ndie();\ndie(0);\n\n//die with an 
error code\ndie(1);\ndue(0376); //octal\n\n?>"
-  ;;  "Example #2 die status example"
-  ;;  (lambda()
-  ;;    (phps-mode-parser-parse)))
-
   (message "\n-- Ran tests for parser boundaries. --"))
 
 (defun phps-mode-test-parser ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]