rescan gt/lt token after TsAsExpression is parsed (#11912)
* refactor: move inType checks to flow plugin * polish: replace hardcoded char codes * fix: rescan greater/less token after asExpression is parsed
This commit is contained in:
@@ -693,7 +693,7 @@ export default class Tokenizer extends ParserErrors {
|
||||
// '?'
|
||||
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||
const next2 = this.input.charCodeAt(this.state.pos + 2);
|
||||
if (next === charCodes.questionMark && !this.state.inType) {
|
||||
if (next === charCodes.questionMark) {
|
||||
if (next2 === charCodes.equalsTo) {
|
||||
// '??='
|
||||
this.finishOp(tt.assign, 3);
|
||||
|
||||
Reference in New Issue
Block a user