Change location of ObjectTypeIndexer to match flow (#228)

This commit is contained in:
Daniel Tschinder 2017-01-27 23:08:20 +01:00 committed by GitHub
parent c424156751
commit e614032504
3 changed files with 12 additions and 9 deletions

View File

@ -282,8 +282,11 @@ pp.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
node.value = this.flowParseTypeInitialiser();
node.variance = variance;
// Finish node first to not include a possible semicolon in the locations
const indexer = this.finishNode(node, "ObjectTypeIndexer");
this.flowObjectTypeSemicolon();
return this.finishNode(node, "ObjectTypeIndexer");
return indexer;
};
pp.flowParseObjectTypeMethodish = function (node) {

View File

@ -129,7 +129,7 @@
{
"type": "ObjectTypeIndexer",
"start": 23,
"end": 47,
"end": 46,
"loc": {
"start": {
"line": 1,
@ -137,7 +137,7 @@
},
"end": {
"line": 1,
"column": 47
"column": 46
}
},
"id": {
@ -194,4 +194,4 @@
]
},
"comments": []
}
}

View File

@ -106,7 +106,7 @@
{
"type": "ObjectTypeIndexer",
"start": 9,
"end": 29,
"end": 28,
"loc": {
"start": {
"line": 1,
@ -114,7 +114,7 @@
},
"end": {
"line": 1,
"column": 29
"column": 28
}
},
"id": {
@ -167,7 +167,7 @@
{
"type": "ObjectTypeIndexer",
"start": 30,
"end": 50,
"end": 49,
"loc": {
"start": {
"line": 1,
@ -175,7 +175,7 @@
},
"end": {
"line": 1,
"column": 50
"column": 49
}
},
"id": {
@ -238,4 +238,4 @@
]
},
"comments": []
}
}