Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Invalid output when for loop's initialization expression is constant #40

Closed
rivol opened this Issue · 1 comment

1 participant

Rivo Laks
Rivo Laks

Slimit produces invalid output with this example:

function test(callback) {
    var index = 3, length = 5;
    for(index; index < length; index++) {
    }
  }

The output in this case is:

function test(callback){var index=3,length=5;for(indexindex<length;index++){}}

As you can see, the semicolon after init expr is missing.
In real world, infinity.js uses such syntax, see https://github.com/airbnb/infinity/blob/master/infinity.js

Rivo Laks

My bad, this is duplicate of #37
Waiting for 0.7.5 release :-)

Rivo Laks rivol closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.