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:
commit
1ccc45426c
@ -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 {
|
||||
|
@ -55,7 +55,7 @@
|
||||
],
|
||||
"context": {
|
||||
"start": 18,
|
||||
"end": null,
|
||||
"end": 30,
|
||||
"type": "ArrayPattern",
|
||||
"elements": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user