I copied the `if` statement from here: https://github.com/mozilla/sweet.js/blob/master/src/expander.js#L2145

The code duplication isn't too bad but that function is already quite long so not sure if there's a good way to break it up.