Skip to content

Commit

Permalink
Handle empty COMMA nodes coming from narcissus.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimvar committed Oct 23, 2011
1 parent 8534e16 commit 17db986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cfa2/jscfa.js
Expand Up @@ -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");
Expand Down

0 comments on commit 17db986

Please sign in to comment.