From 17db986586130fd3f5fa7d91d3c67f39b6a0dd14 Mon Sep 17 00:00:00 2001 From: Dimitris Vardoulakis Date: Sun, 23 Oct 2011 17:38:15 -0400 Subject: [PATCH] Handle empty COMMA nodes coming from narcissus. --- lib/cfa2/jscfa.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cfa2/jscfa.js b/lib/cfa2/jscfa.js index 2fe3c2a..096b035 100644 --- a/lib/cfa2/jscfa.js +++ b/lib/cfa2/jscfa.js @@ -273,8 +273,8 @@ function fixExp(n, funName) { } else if (nt === HOOK || N_ARY.memq(nt)) { // Uncomment this if Narcissus produces empty COMMA nodes. - // if (nt === COMMA && ch.length === 0) - // ch.push(new Node(n.tokenizer, {type:TRUE})); + if (nt === COMMA && ch.length === 0) + ch.push(new Node(n.tokenizer, {type:TRUE})); if (nt === ARRAY_INIT) { ch.forEach(function(kid, i, ch) { if (kid === null) ch[i] = idNode(n.tokenizer, "undefined");