forked from jquery/esprima
-
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.
Last saved leading comment of lastChild can be inside of current node range, but previous comments can be suitable for it Closes jquerygh-1071 Closes jquerygh-1205
- Loading branch information
Showing
9 changed files
with
353 additions
and
3 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,4 @@ | ||
(/* comment */{ | ||
/* comment 2 */ | ||
p1: null | ||
}) |
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,91 @@ | ||
{ | ||
"range": [ | ||
0, | ||
51 | ||
], | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
51 | ||
], | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"range": [ | ||
14, | ||
50 | ||
], | ||
"type": "ObjectExpression", | ||
"properties": [ | ||
{ | ||
"range": [ | ||
40, | ||
48 | ||
], | ||
"type": "Property", | ||
"key": { | ||
"range": [ | ||
40, | ||
42 | ||
], | ||
"type": "Identifier", | ||
"name": "p1" | ||
}, | ||
"computed": false, | ||
"value": { | ||
"range": [ | ||
44, | ||
48 | ||
], | ||
"type": "Literal", | ||
"value": null, | ||
"raw": "null" | ||
}, | ||
"kind": "init", | ||
"method": false, | ||
"shorthand": false, | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": " comment 2 ", | ||
"range": [ | ||
20, | ||
35 | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": " comment ", | ||
"range": [ | ||
1, | ||
14 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"comments": [ | ||
{ | ||
"type": "Block", | ||
"value": " comment ", | ||
"range": [ | ||
1, | ||
14 | ||
] | ||
}, | ||
{ | ||
"type": "Block", | ||
"value": " comment 2 ", | ||
"range": [ | ||
20, | ||
35 | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
/**/ function a() {} |
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,56 @@ | ||
{ | ||
"range": [ | ||
5, | ||
20 | ||
], | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
5, | ||
20 | ||
], | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
14, | ||
15 | ||
], | ||
"type": "Identifier", | ||
"name": "a" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
18, | ||
20 | ||
], | ||
"type": "BlockStatement", | ||
"body": [] | ||
}, | ||
"generator": false, | ||
"expression": false, | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"comments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
/**/ function a() {function o() {}} |
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,84 @@ | ||
{ | ||
"range": [ | ||
5, | ||
35 | ||
], | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
5, | ||
35 | ||
], | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
14, | ||
15 | ||
], | ||
"type": "Identifier", | ||
"name": "a" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
18, | ||
35 | ||
], | ||
"type": "BlockStatement", | ||
"body": [ | ||
{ | ||
"range": [ | ||
19, | ||
34 | ||
], | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
28, | ||
29 | ||
], | ||
"type": "Identifier", | ||
"name": "o" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
32, | ||
34 | ||
], | ||
"type": "BlockStatement", | ||
"body": [] | ||
}, | ||
"generator": false, | ||
"expression": false | ||
} | ||
] | ||
}, | ||
"generator": false, | ||
"expression": false, | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"comments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
/**/ function a() {/**/function o() {}} |
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,102 @@ | ||
{ | ||
"range": [ | ||
5, | ||
39 | ||
], | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
5, | ||
39 | ||
], | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
14, | ||
15 | ||
], | ||
"type": "Identifier", | ||
"name": "a" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
18, | ||
39 | ||
], | ||
"type": "BlockStatement", | ||
"body": [ | ||
{ | ||
"range": [ | ||
23, | ||
38 | ||
], | ||
"type": "FunctionDeclaration", | ||
"id": { | ||
"range": [ | ||
32, | ||
33 | ||
], | ||
"type": "Identifier", | ||
"name": "o" | ||
}, | ||
"params": [], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
36, | ||
38 | ||
], | ||
"type": "BlockStatement", | ||
"body": [] | ||
}, | ||
"generator": false, | ||
"expression": false, | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
19, | ||
23 | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"generator": false, | ||
"expression": false, | ||
"leadingComments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"comments": [ | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
0, | ||
4 | ||
] | ||
}, | ||
{ | ||
"type": "Block", | ||
"value": "", | ||
"range": [ | ||
19, | ||
23 | ||
] | ||
} | ||
] | ||
} |