fix flow-double-nullable-type-cant-be-parsed

This commit is contained in:
hassanAli321 2018-06-04 11:09:32 -07:00 committed by Brian Ng
parent 80b3362fcc
commit 6480ae4a9f

View File

@ -628,7 +628,7 @@ export default class Tokenizer extends LocationParser {
// '?' // '?'
const next = this.input.charCodeAt(this.state.pos + 1); const next = this.input.charCodeAt(this.state.pos + 1);
const next2 = this.input.charCodeAt(this.state.pos + 2); const next2 = this.input.charCodeAt(this.state.pos + 2);
if (next === charCodes.questionMark) { if (next === charCodes.questionMark && !this.state.inType) {
if (next2 === charCodes.equalsTo) { if (next2 === charCodes.equalsTo) {
// '??=' // '??='
this.finishOp(tt.assign, 3); this.finishOp(tt.assign, 3);