[Pkg-javascript-commits] [node-acorn-jsx] 382/484: Allow pattern in catch param (fixes #191).

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:59 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 3d9048a6921739bb4a9a5b90b5bad643d402806c
Author: Ingvar Stepanyan <me at rreverser.com>
Date:   Fri Jan 9 02:50:32 2015 +0200

    Allow pattern in catch param (fixes #191).
---
 acorn.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/acorn.js b/acorn.js
index ff3881b..2a7c89e 100644
--- a/acorn.js
+++ b/acorn.js
@@ -1836,9 +1836,8 @@
       var clause = startNode();
       next();
       expect(_parenL);
-      clause.param = parseIdent();
-      if (strict && isStrictBadIdWord(clause.param.name))
-        raise(clause.param.start, "Binding " + clause.param.name + " in strict mode");
+      clause.param = parseAssignableAtom();
+      checkLVal(clause.param, true);
       expect(_parenR);
       clause.guard = null;
       clause.body = parseBlock();

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