Removing a variable declarator results in invalid syntax #18

Open
jneen opened this Issue Jul 17, 2013 · 0 comments

1 participant

@jneen

Hey there! I'm using falafel to strip debugging statements from my code, which involves removing the DEBUG variable. Unfortunately, its variable declarator is bunched up with others (because of coffeescript) like so:

var foo, bar, DEBUG, baz;

When I update the DEBUG node with the empty string, the result is

var foo, bar, , baz;

which is a syntax error. Is there a better way to do this?

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