support commas as obj property separators in flow

This commit is contained in:
Christopher Monsanto 2015-05-01 00:09:26 -04:00
parent 1a53d5ca46
commit c263a25b54

View File

@ -322,7 +322,7 @@ pp.flow_parseObjectType = function (allowStatic) {
}
pp.flow_objectTypeSemicolon = function () {
if (!this.eat(tt.semi) && this.type !== tt.braceR) {
if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) {
this.unexpected()
}
}