From d3d1d8eb40425e70c4083a54b1049b143de3bc9b Mon Sep 17 00:00:00 2001
From: Thomas Wood <thomas.wood09@imperial.ac.uk>
Date: Wed, 9 Mar 2016 10:44:27 +0000
Subject: [PATCH] esprima-to-ast: Missed trPattern in trCatchClause

---
 esprima-to-ast.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/esprima-to-ast.js b/esprima-to-ast.js
index 63f29dc..e8d5424 100644
--- a/esprima-to-ast.js
+++ b/esprima-to-ast.js
@@ -181,7 +181,7 @@ function esprimaToAST(prog) {
       throw new EsprimaToASTError("trCatchClause called with wrong type: " + clause.type);
     }
     // clause.guard is a custom Mozilla extension
-    return [clause.param, trBlockStat(clause.body)];
+    return [trPattern(clause.param), trBlockStat(clause.body)];
   };
 
   /*** Statements ***/
-- 
GitLab