Skip to content

Commit

Permalink
add end position to object and array patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbirtles committed Aug 22, 2018
1 parent 9eec6f8 commit bbe5319
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parse/read/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function readContext(parser: Parser) {

errorOnAssignmentPattern(parser);
parser.eat(']', true);
context.end = parser.index;
}

else if (parser.eat('{')) {
Expand Down Expand Up @@ -95,6 +96,7 @@ export default function readContext(parser: Parser) {

errorOnAssignmentPattern(parser);
parser.eat('}', true);
context.end = parser.index;
}

else {
Expand Down

0 comments on commit bbe5319

Please sign in to comment.