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

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

[elpa] master f9d28d3 052/110: Adjust js2-print-export-node


From: Dmitry Gutov
Subject: [elpa] master f9d28d3 052/110: Adjust js2-print-export-node
Date: Thu, 23 Jun 2016 01:12:56 +0000 (UTC)

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

    Adjust js2-print-export-node
    
    #287
---
 js2-mode.el     |    3 ++-
 tests/parser.el |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index c98c00d..bf7219a 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -2551,7 +2551,8 @@ so many of its properties will be nil.
       (js2-print-from-clause from))
      (exports-list
       (js2-print-named-imports exports-list)))
-    (insert ";\n")))
+    (unless (and default (not (js2-assign-node-p default)))
+      (insert ";\n"))))
 
 (cl-defstruct (js2-while-node
                (:include js2-loop-node)
diff --git a/tests/parser.el b/tests/parser.el
index ece263d..79481c8 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -795,8 +795,8 @@ the test."
 (js2-deftest-parse parse-re-export-named-list "export {foo, bar as bang} from 
'other/lib';")
 (js2-deftest-parse parse-export-const-declaration "export const PI = Math.PI;")
 (js2-deftest-parse parse-export-let-declaration "export let foo = [1];")
-(js2-deftest-parse parse-export-function-declaration "export default function 
doStuff() {\n}\n;")
-(js2-deftest-parse parse-export-generator-declaration "export default 
function* one() {\n}\n;")
+(js2-deftest-parse parse-export-function-declaration "export default function 
doStuff() {\n}")
+(js2-deftest-parse parse-export-generator-declaration "export default 
function* one() {\n}")
 (js2-deftest-parse parse-export-assignment-expression "export default a = b;")
 
 ;;; Strings



reply via email to

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