Skip to content

Commit

Permalink
Lightscript OBA fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
wcjohnson committed Sep 30, 2017
1 parent 1aded08 commit 5e45d5e
Show file tree
Hide file tree
Showing 28 changed files with 1,453 additions and 443 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,40 +79,95 @@
"body": [
{
"type": "ExpressionStatement",
"start": 10,
"end": 11,
"start": 6,
"end": 13,
"loc": {
"start": {
"line": 2,
"column": 2
"line": 1,
"column": 6
},
"end": {
"line": 2,
"column": 3
"line": 3,
"column": 1
}
},
"expression": {
"type": "Identifier",
"start": 10,
"end": 11,
"type": "ObjectExpression",
"start": 6,
"end": 13,
"loc": {
"start": {
"line": 2,
"column": 2
"line": 1,
"column": 6
},
"end": {
"line": 2,
"column": 3
},
"identifierName": "x"
"line": 3,
"column": 1
}
},
"name": "x"
"properties": [
{
"type": "ObjectProperty",
"start": 10,
"end": 11,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 3
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 10,
"end": 11,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 3
},
"identifierName": "x"
},
"name": "x"
},
"value": {
"type": "Identifier",
"start": 10,
"end": 11,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 3
},
"identifierName": "x"
},
"name": "x"
},
"extra": {
"shorthand": true
}
}
]
}
}
],
"directives": [],
"extra": {
"curly": true
"curly": false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,42 @@
"column": 7
}
},
"body": [],
"body": [
{
"type": "ExpressionStatement",
"start": 15,
"end": 17,
"loc": {
"start": {
"line": 4,
"column": 5
},
"end": {
"line": 4,
"column": 7
}
},
"expression": {
"type": "ObjectExpression",
"start": 15,
"end": 17,
"loc": {
"start": {
"line": 4,
"column": 5
},
"end": {
"line": 4,
"column": 7
}
},
"properties": []
}
}
],
"directives": [],
"extra": {
"curly": true
"curly": false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"alternatives": {
"objectBlockAmbiguity": {
"excludePlugins": ["objectBlockAmbiguity_preferObject"],
"excludePlugins": ["whiteblockOnly", "whiteblockPreferred"],
"expected": "expected.objectBlockAmbiguity.json"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,54 +79,22 @@
},
"body": {
"type": "BlockStatement",
"start": 16,
"start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 16
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"expression": {
"type": "ObjectExpression",
"start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"properties": []
}
}
],
"body": [],
"directives": [],
"extra": {
"curly": false
"curly": true
}
}
}
Expand Down
40 changes: 36 additions & 4 deletions test/fixtures/lightscript/for-in/now/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,54 @@
},
"body": {
"type": "BlockStatement",
"start": 18,
"start": 16,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 18
"column": 16
},
"end": {
"line": 1,
"column": 20
}
},
"body": [],
"body": [
{
"type": "ExpressionStatement",
"start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"expression": {
"type": "ObjectExpression",
"start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"properties": []
}
}
],
"directives": [],
"extra": {
"curly": true
"curly": false
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions test/fixtures/lightscript/for-in/now/options.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"alternatives": {
"whiteblock": {
"braceblock": {
"allPlugins": true,
"expected": "expected.whiteblock.json"
"excludePlugins": ["whiteblockOnly", "whiteblockPreferred"],
"expected": "expected.braceblock.json"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,42 +78,10 @@
"column": 10
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 8,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 10
}
},
"expression": {
"type": "ObjectExpression",
"start": 8,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 10
}
},
"properties": []
}
}
],
"body": [],
"directives": [],
"extra": {
"curly": false
"curly": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,42 @@
"column": 10
}
},
"body": [],
"body": [
{
"type": "ExpressionStatement",
"start": 8,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 10
}
},
"expression": {
"type": "ObjectExpression",
"start": 8,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 10
}
},
"properties": []
}
}
],
"directives": [],
"extra": {
"curly": true
"curly": false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"alternatives": {
"whiteblock": {
"braceblock": {
"allPlugins": true,
"excludePlugins": ["whiteblockPreferred"],
"expected": "expected.whiteblock.json"
"excludePlugins": ["whiteblockPreferred", "whiteblockOnly"],
"expected": "expected.braceblock.json"
}
}
}
Loading

0 comments on commit 5e45d5e

Please sign in to comment.