`burrito(src, function(){return undefined;});` is not an identity transformation for inline 'if's #6

Open
apatil opened this Issue Dec 6, 2011 · 0 comments

Comments

Projects
None yet
1 participant

apatil commented Dec 6, 2011

This is a relatively minor issue, but the following:

var burrito = require('burrito');

var src = "(x ? 1 : 0);"

console.log(src);
src = burrito(src, function(){return undefined;});
console.log(src);
console.log(burrito(src, function(){return undefined;}));

produces the following:

(x ? 1 : 0);
[ x ? 1 : 0 ][0];
[ [ x ? 1 : 0 ][0] ][0];

I'm not sure if this is the intended behavior, but it makes it a bit harder to repeatedly transform a program until it stops changing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment