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

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

[elpa] externals/phps-mode ec71e15 074/405: Fixed bug where token-number


From: Stefan Monnier
Subject: [elpa] externals/phps-mode ec71e15 074/405: Fixed bug where token-numbers are not defined
Date: Sat, 13 Jul 2019 09:59:46 -0400 (EDT)

branch: externals/phps-mode
commit ec71e150c7a973510febe2794c93ecf430561025
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Fixed bug where token-numbers are not defined
---
 phps-functions.el          |  4 +++-
 sample-php-files/class.php | 12 ++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/phps-functions.el b/phps-functions.el
index c792c0a..4020428 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -66,7 +66,9 @@
             ;; When bracket count at start is larger than bracket count at end
             (when (and
                    (boundp 'phps-mode/lexer-tokens)
-                   (> indent-start indent-end))
+                   (> indent-start indent-end)
+                   start-token-number
+                   end-token-number)
               (let ((token-number start-token-number)
                     (valid-tokens t)
                     (last-token-is-open-brace nil)
diff --git a/sample-php-files/class.php b/sample-php-files/class.php
index 730480e..891b7e7 100644
--- a/sample-php-files/class.php
+++ b/sample-php-files/class.php
@@ -25,6 +25,18 @@ class MyClass
         if (!empty($this->var)) {
             $this->var = '';
         }
+        if (empty(
+                $this->var
+        )) {
+            $this->var = 'abc';
+        }
+        if (empty(
+                $this->var
+                ) && !empty($this->var)
+            ) {
+            $this->var = 'abc123';
+        }
+
         $this->var = 'abc';
         $this->var = '\\';
     }



reply via email to

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