diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index 956b218eae..2b0f57c847 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -1,5 +1,5 @@ import type { TokContext } from "./context"; -import type { Token } from "./index"; +import type { TokenType } from "./types"; import { Position } from "../util/location"; import { types as ct } from "./context"; import { types as tt } from "./types"; @@ -12,7 +12,7 @@ export default class State { this.potentialArrowAt = -1; - this.inMethod = this.inFunction = this.inGenerator = this.inAsync = false; + this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inType = false; this.labels = []; @@ -61,6 +61,8 @@ export default class State { inFunction: boolean; inGenerator: boolean; inMethod: boolean; + inAsync: boolean; + inType: boolean; // Labels in scope. labels: Array; @@ -86,7 +88,7 @@ export default class State { // Properties of the current token: // Its type - type: Token; + type: TokenType; // For tokens that include more information than their type, the value value: any;