Merge branch 'master' of github.com:babel/babel

This commit is contained in:
Sebastian McKenzie 2015-05-01 09:32:28 +01:00
commit 15f5e658fc
3 changed files with 4 additions and 3 deletions

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()
}
}

View File

@ -37,7 +37,7 @@ class CodeGenerator {
retainLines: opts.retainLines,
comments: opts.comments == null || opts.comments,
compact: opts.compact,
quotes: CodeGenerator.findCommonStringDelimeter(code, tokens),
quotes: CodeGenerator.findCommonStringDelimiter(code, tokens),
indent: {
adjustMultilineComment: true,
style: style,
@ -56,7 +56,7 @@ class CodeGenerator {
return format;
}
static findCommonStringDelimeter(code, tokens) {
static findCommonStringDelimiter(code, tokens) {
var occurences = {
single: 0,
double: 0

View File

@ -1,3 +1,4 @@
import * as node from "../../api/node";
import * as messages from "../../messages";
import * as util from "../../util";