Fix the location of params, when flow and default value used (#68)

Fixes #67
This commit is contained in:
Daniel Tschinder
2016-07-06 23:48:47 +02:00
committed by Henry Zhu
parent 83bf84f7cd
commit 34a82f716e
3 changed files with 251 additions and 1 deletions

View File

@@ -171,7 +171,7 @@ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
left.decorators = decorators;
}
this.parseAssignableListItemTypes(left);
elts.push(this.parseMaybeDefault(null, null, left));
elts.push(this.parseMaybeDefault(left.start, left.loc.start, left));
}
}
return elts;