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

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

[elpa] master 8047d7f 061/110: Recognize for-of and for-in loops with co


From: Dmitry Gutov
Subject: [elpa] master 8047d7f 061/110: Recognize for-of and for-in loops with const
Date: Thu, 23 Jun 2016 01:12:59 +0000 (UTC)

branch: master
commit 8047d7f172b1dd10475ba0778f029bd0660976e9
Author: Christoph Dittmann <address@hidden>
Commit: Christoph Dittmann <address@hidden>

    Recognize for-of and for-in loops with const
    
    Declarations in for-of and for-in loops may also be "const".  See
    
http://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-bindinginstantiation
---
 js2-mode.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js2-mode.el b/js2-mode.el
index 7e5c9d8..74f0ea2 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -8924,7 +8924,7 @@ Last matched token must be js2-FOR."
              ((= tt js2-SEMI)
               (js2-unget-token)
               (setq init (make-js2-empty-expr-node)))
-             ((or (= tt js2-VAR) (= tt js2-LET))
+             ((or (= tt js2-VAR) (= tt js2-LET) (= tt js2-CONST))
               (setq init (js2-parse-variables tt (js2-current-token-beg))))
              (t
               (js2-unget-token)



reply via email to

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