add a "spec" transformer namespace for transformers that nicen up code and make it well, more spec compliant

This commit is contained in:
Sebastian McKenzie
2014-12-10 21:09:58 +11:00
parent 1c22c608a9
commit e6da342e8b
20 changed files with 94 additions and 21 deletions

View File

@@ -1,3 +0,0 @@
var obj = {
"foobar": "lol"
};

View File

@@ -1,5 +0,0 @@
"use strict";
var obj = {
foobar: "lol"
};

View File

@@ -0,0 +1 @@
var obj = { a: 1, a: 2 };

View File

@@ -0,0 +1 @@
var obj = { "a": 1, "a": 2 };

View File

@@ -0,0 +1 @@
var obj = { a: 1, "a": 2 };

View File

@@ -0,0 +1,3 @@
{
"throws": "Duplicate property key"
}

View File

@@ -0,0 +1,3 @@
for (var i = 0 in obj) {
}

View File

@@ -0,0 +1,3 @@
for (var i = 0 of obj) {
}

View File

@@ -0,0 +1,3 @@
{
"throws": "No assignments allowed in for-in/of head"
}

View File

@@ -0,0 +1,5 @@
function f() { return 1; }
{
function f() { return 2; }
}
assert.equal(f(), 1);