forked from lightscript/babylon-lightscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for..of
no longer requires a variable qualifier
Addresses wcjohnson/lightscript#38
- Loading branch information
Showing
11 changed files
with
274 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
test/fixtures/es2015/uncategorised/107/options.lightscript.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/fixtures/esprima/es2015-for-of/for-of-array-pattern/options.lightscript.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/fixtures/esprima/es2015-for-of/for-of-object-pattern/options.lightscript.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/fixtures/esprima/es2015-for-of/for-of/options.lightscript.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/fixtures/esprima/es2015-for-of/invalid-lhs-init/options.lightscript.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
for elem of in arr: of |
115 changes: 115 additions & 0 deletions
115
test/fixtures/lightscript/for-in/like-for-of/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"type": "File", | ||
"start": 0, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 22 | ||
} | ||
}, | ||
"program": { | ||
"type": "Program", | ||
"start": 0, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 22 | ||
} | ||
}, | ||
"sourceType": "script", | ||
"body": [ | ||
{ | ||
"type": "ForInArrayStatement", | ||
"start": 0, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 22 | ||
} | ||
}, | ||
"elem": { | ||
"type": "Identifier", | ||
"start": 9, | ||
"end": 11, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 9 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 11 | ||
}, | ||
"identifierName": "of" | ||
}, | ||
"name": "of" | ||
}, | ||
"body": { | ||
"type": "ExpressionStatement", | ||
"start": 20, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 20 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 22 | ||
} | ||
}, | ||
"expression": { | ||
"type": "Identifier", | ||
"start": 20, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 20 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 22 | ||
}, | ||
"identifierName": "of" | ||
}, | ||
"name": "of" | ||
} | ||
}, | ||
"array": { | ||
"type": "Identifier", | ||
"start": 15, | ||
"end": 18, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 15 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 18 | ||
}, | ||
"identifierName": "arr" | ||
}, | ||
"name": "arr" | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/fixtures/lightscript/for-of/like-enhanced-for-in/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
for elem of elems: elem |
115 changes: 115 additions & 0 deletions
115
test/fixtures/lightscript/for-of/like-enhanced-for-in/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"type": "File", | ||
"start": 0, | ||
"end": 23, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 23 | ||
} | ||
}, | ||
"program": { | ||
"type": "Program", | ||
"start": 0, | ||
"end": 23, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 23 | ||
} | ||
}, | ||
"sourceType": "script", | ||
"body": [ | ||
{ | ||
"type": "ForOfStatement", | ||
"start": 0, | ||
"end": 23, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 23 | ||
} | ||
}, | ||
"left": { | ||
"type": "Identifier", | ||
"start": 4, | ||
"end": 8, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 8 | ||
}, | ||
"identifierName": "elem" | ||
}, | ||
"name": "elem" | ||
}, | ||
"right": { | ||
"type": "Identifier", | ||
"start": 12, | ||
"end": 17, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 12 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 17 | ||
}, | ||
"identifierName": "elems" | ||
}, | ||
"name": "elems" | ||
}, | ||
"body": { | ||
"type": "ExpressionStatement", | ||
"start": 19, | ||
"end": 23, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 19 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 23 | ||
} | ||
}, | ||
"expression": { | ||
"type": "Identifier", | ||
"start": 19, | ||
"end": 23, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 19 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 23 | ||
}, | ||
"identifierName": "elem" | ||
}, | ||
"name": "elem" | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |