[Pkg-javascript-commits] [node-acorn-jsx] 307/484: make ImportDeclaration and ExportDeclaration semicolons more spec-compliant

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit 9d3580b23ac6e5a55013339c3b13cde5c6a6072b
Author: Sebastian McKenzie <sebmck at gmail.com>
Date:   Wed Oct 29 20:35:37 2014 +1100

    make ImportDeclaration and ExportDeclaration semicolons more spec-compliant
---
 acorn.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/acorn.js b/acorn.js
index 8013c92..401b942 100644
--- a/acorn.js
+++ b/acorn.js
@@ -2482,8 +2482,8 @@
       node.source = null;
       semicolon();
     } else {
-      // export * from '...'
-      // export { x, y as z } [from '...']
+      // export * from '...';
+      // export { x, y as z } [from '...'];
       var isBatch = tokType === _star;
       node.declaration = null;
       node['default'] = false;
@@ -2495,6 +2495,7 @@
         if (isBatch) unexpected();
         node.source = null;
       }
+      semicolon();
     }
     return finishNode(node, "ExportDeclaration");
   }
@@ -2549,6 +2550,7 @@
       // (it doesn't support mixed default + named yet)
       node.kind = node.specifiers[0]['default'] ? "default" : "named";
     }
+    semicolon();
     return finishNode(node, "ImportDeclaration");
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list