perf: call isLineTerminator as last check

This commit is contained in:
Daniel Tschinder
2019-01-16 02:20:25 -08:00
parent 3a3d5cbe9c
commit f216975378
2 changed files with 2 additions and 2 deletions

View File

@@ -1319,7 +1319,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
tsCheckLineTerminatorAndMatch(tokenType: TokenType, next: boolean) {
return !this.isLineTerminator() && (next || this.match(tokenType));
return (next || this.match(tokenType)) && !this.isLineTerminator();
}
tsTryParseGenericAsyncArrowFunction(