[Pkg-javascript-commits] [node-acorn-jsx] 47/484: Don't allow keywords as properties when forbidReserved is on

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:03 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 16f8259dab85e8a8ac332d4a84d331f6bea0f369
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Mon Nov 5 22:25:57 2012 +0100

    Don't allow keywords as properties when forbidReserved is on
---
 acorn.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/acorn.js b/acorn.js
index 34dfc94..6323b1f 100644
--- a/acorn.js
+++ b/acorn.js
@@ -1585,7 +1585,7 @@
 
   function parseIdent(liberal) {
     var node = startNode();
-    node.name = tokType === _name ? tokVal : (liberal && tokType.keyword) || unexpected();
+    node.name = tokType === _name ? tokVal : (liberal && !options.forbidReserved && tokType.keyword) || unexpected();
     next();
     return finishNode(node, "Identifier");
   }

-- 
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