perf: Remove unnecessary check for flow plugin inside of flow plugin
This commit is contained in:
parent
c2e41588aa
commit
49f7bcf271
@ -2726,11 +2726,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
skipBlockComment(): void {
|
skipBlockComment(): void {
|
||||||
if (
|
if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
|
||||||
this.hasPlugin("flow") &&
|
|
||||||
this.hasPlugin("flowComments") &&
|
|
||||||
this.skipFlowComment()
|
|
||||||
) {
|
|
||||||
if (this.state.hasFlowComment) {
|
if (this.state.hasFlowComment) {
|
||||||
this.unexpected(
|
this.unexpected(
|
||||||
null,
|
null,
|
||||||
@ -2743,7 +2739,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hasPlugin("flow") && this.state.hasFlowComment) {
|
if (this.state.hasFlowComment) {
|
||||||
const end = this.state.input.indexOf("*-/", (this.state.pos += 2));
|
const end = this.state.input.indexOf("*-/", (this.state.pos += 2));
|
||||||
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
|
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
|
||||||
this.state.pos = end + 3;
|
this.state.pos = end + 3;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user