0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

Merge pull request #1674 from UnwrittenFun/fix/object-array-pattern-end

add end position to object and array patterns
This commit is contained in:
Rich Harris 2018-08-22 22:07:51 -04:00 committed by GitHub
commit 1ccc45426c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,7 @@ export default function readContext(parser: Parser) {
errorOnAssignmentPattern(parser);
parser.eat(']', true);
context.end = parser.index;
}
else if (parser.eat('{')) {
@ -95,6 +96,7 @@ export default function readContext(parser: Parser) {
errorOnAssignmentPattern(parser);
parser.eat('}', true);
context.end = parser.index;
}
else {

View File

@ -55,7 +55,7 @@
],
"context": {
"start": 18,
"end": null,
"end": 30,
"type": "ArrayPattern",
"elements": [
{