From bbe5319f3b6eb82c605574a05f74d308ca6bcb31 Mon Sep 17 00:00:00 2001 From: James Birtles Date: Wed, 22 Aug 2018 17:50:19 +0100 Subject: [PATCH] add end position to object and array patterns --- src/parse/read/context.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parse/read/context.ts b/src/parse/read/context.ts index 77fd2cbf68..13d1e9ece1 100644 --- a/src/parse/read/context.ts +++ b/src/parse/read/context.ts @@ -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 {