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

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

[elpa] master 672e2da 07/49: js2-parse-mul-expr: Parse the right operand


From: Dmitry Gutov
Subject: [elpa] master 672e2da 07/49: js2-parse-mul-expr: Parse the right operand as exponentiation too
Date: Mon, 16 Jan 2017 15:35:46 +0000 (UTC)

branch: master
commit 672e2dae9220d73f7c92d940b7a8b814ed013b6f
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    js2-parse-mul-expr: Parse the right operand as exponentiation too
    
    Follow-up to #344.
---
 js2-mode.el     |    2 +-
 tests/parser.el |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index 6123019..e0ad559 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9923,7 +9923,7 @@ FIXME: The latter option is unused?"
     (while continue
       (setq tt (js2-get-token))
       (if (memq tt js2-parse-mul-ops)
-          (setq pn (js2-make-binary tt pn 'js2-parse-unary-expr))
+          (setq pn (js2-make-binary tt pn 'js2-parse-expon-expr))
         (js2-unget-token)
         (setq continue nil)))
     pn))
diff --git a/tests/parser.el b/tests/parser.el
index 0cd5f07..a0e2c5a 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -935,7 +935,7 @@ the test."
   "class Foo {;}" :reference "class Foo {\n}")
 
 (js2-deftest-parse exponentiation
-  "a **= b ** c ** d;")
+  "a **= b ** c ** d * e ** f;")
 
 (js2-deftest-parse exponentiation-prohibits-unary-op
   "var a = -b ** c" :syntax-error "b")



reply via email to

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