forked from jquery/esprima
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes jquery#1203.
- Loading branch information
Showing
18 changed files
with
718 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function f() { | ||
let x = new.target; | ||
} |
151 changes: 151 additions & 0 deletions
151
test/fixtures/ES6/meta-property/assign-new-target.tree.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,151 @@ | ||
{ | ||
"range": [ | ||
0, | ||
40 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
40 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
9, | ||
10 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 9 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 10 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "f" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
13, | ||
40 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 13 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "BlockStatement", | ||
"body": [ | ||
{ | ||
"range": [ | ||
19, | ||
38 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 23 | ||
} | ||
}, | ||
"type": "VariableDeclaration", | ||
"declarations": [ | ||
{ | ||
"range": [ | ||
23, | ||
37 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 22 | ||
} | ||
}, | ||
"type": "VariableDeclarator", | ||
"id": { | ||
"range": [ | ||
23, | ||
24 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 9 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "x" | ||
}, | ||
"init": { | ||
"range": [ | ||
27, | ||
37 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 12 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 22 | ||
} | ||
}, | ||
"type": "MetaProperty", | ||
"meta": "new", | ||
"property": "target" | ||
} | ||
} | ||
], | ||
"kind": "let" | ||
} | ||
] | ||
}, | ||
"generator": false, | ||
"expression": false | ||
} | ||
] | ||
} |
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 @@ | ||
{"index":29,"lineNumber":1,"column":30,"message":"Error: Line 1: Unexpected token .","description":"Unexpected token ."} |
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 @@ | ||
var x = function() { y = new..target; } |
1 change: 1 addition & 0 deletions
1
test/fixtures/ES6/meta-property/invalid-new-target.failure.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 @@ | ||
{"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} |
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 @@ | ||
var x = new.target; |
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,3 @@ | ||
function f() { | ||
new new.target; | ||
} |
131 changes: 131 additions & 0 deletions
131
test/fixtures/ES6/meta-property/new-new-target.tree.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,131 @@ | ||
{ | ||
"range": [ | ||
0, | ||
36 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
36 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
9, | ||
10 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 9 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 10 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "f" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
13, | ||
36 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 13 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 1 | ||
} | ||
}, | ||
"type": "BlockStatement", | ||
"body": [ | ||
{ | ||
"range": [ | ||
19, | ||
34 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 19 | ||
} | ||
}, | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"range": [ | ||
19, | ||
33 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 18 | ||
} | ||
}, | ||
"type": "NewExpression", | ||
"callee": { | ||
"range": [ | ||
23, | ||
33 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 18 | ||
} | ||
}, | ||
"type": "MetaProperty", | ||
"meta": "new", | ||
"property": "target" | ||
}, | ||
"arguments": [] | ||
} | ||
} | ||
] | ||
}, | ||
"generator": false, | ||
"expression": false | ||
} | ||
] | ||
} |
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,3 @@ | ||
function f() { | ||
new.target; | ||
} |
Oops, something went wrong.